remove prismjs and add it as a script & updaye codehighlight
parent
7625a006d2
commit
c0d820e998
|
@ -1,7 +1,7 @@
|
|||
import Prism from 'prismjs';
|
||||
import { DomHandler } from 'primevue/utils';
|
||||
|
||||
const CodeHighlight = {
|
||||
beforeMount(el, binding) {
|
||||
mounted(el, binding) {
|
||||
const modifiers = binding.modifiers;
|
||||
const value = binding.value;
|
||||
|
||||
|
@ -9,7 +9,7 @@ const CodeHighlight = {
|
|||
else if (modifiers.css || value === 'css') el.className = 'language-css';
|
||||
else el.className = 'language-markup';
|
||||
|
||||
Prism.highlightElement(el.children[0]);
|
||||
DomHandler.isClient() && window.Prism.highlightElement(el.children[0]);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -55,11 +55,15 @@ export default defineNuxtConfig({
|
|||
|
||||
gtag('config', 'UA-93461466-1');
|
||||
`
|
||||
},
|
||||
{
|
||||
src: baseUrl + 'scripts/prism.js',
|
||||
'data-manual': true
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
css: ['@/assets/styles/primevue.css', '/node_modules/primeflex/primeflex.css', '/node_modules/primeicons/primeicons.css', '/node_modules/prismjs/themes/prism-coy.css', '@/assets/styles/flags.css'],
|
||||
css: ['@/assets/styles/primevue.css', '/node_modules/primeflex/primeflex.css', '/node_modules/primeicons/primeicons.css', '@/assets/styles/flags.css'],
|
||||
vite: {
|
||||
plugins: [vueJsx()],
|
||||
resolve: {
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -42,7 +42,6 @@
|
|||
"nuxt": "^3.0.0",
|
||||
"primeflex": "^3.3.0",
|
||||
"primeicons": "^6.0.1",
|
||||
"prismjs": "^1.15.0",
|
||||
"quill": "^1.3.7",
|
||||
"rollup-plugin-postcss": "^4.0.0",
|
||||
"rollup-plugin-terser": "^7.0.2",
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue