fix vditor bug

This commit is contained in:
AceDataCloud committed 2021-08-28 01:58:16 +08:00
1 parent 01021b1a5f
commit 407d75dc5f
4 files changed
+42 -3

No files matched your search

+10 -1
View File
@@ -1,6 +1,8 @@
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import * as path from 'path';
import replace from '@rollup/plugin-replace';
import pkg from './package.json';
export default defineConfig({
server: {
@@ -11,7 +13,14 @@ export default defineConfig({
}
}
},
plugins: [vue()],
plugins: [
vue(),
replace({
preventAssignment: true,
VDITOR_VERSION: JSON.stringify(pkg.dependencies.vditor.replace(/^[\^\~]/g, '')),
'_VDITOR_VERSION as VDITOR_VERSION': ''
})
],
resolve: {
alias: {
'@': path.resolve(__dirname, './src')