mirror of
https://gitee.com/dromara/go-view.git
synced 2026-01-30 00:05:29 +08:00
fix: 解决编辑器的问题
This commit is contained in:
@@ -3,7 +3,8 @@ import vue from '@vitejs/plugin-vue'
|
||||
import { resolve } from 'path'
|
||||
import { OUTPUT_DIR, brotliSize, chunkSizeWarningLimit, terserOptions, rollupOptions } from './build/constant'
|
||||
import viteCompression from 'vite-plugin-compression'
|
||||
import { viteMockServe} from "vite-plugin-mock";
|
||||
import { viteMockServe } from 'vite-plugin-mock'
|
||||
import monacoEditorPlugin from 'vite-plugin-monaco-editor'
|
||||
|
||||
function pathResolve(dir: string) {
|
||||
return resolve(process.cwd(), '.', dir)
|
||||
@@ -36,17 +37,20 @@ export default defineConfig({
|
||||
},
|
||||
plugins: [
|
||||
vue(),
|
||||
monacoEditorPlugin({
|
||||
languageWorkers: ['editorWorkerService', 'typescript', 'json']
|
||||
}),
|
||||
viteMockServe({
|
||||
mockPath: "/src/api/mock",
|
||||
mockPath: '/src/api/mock',
|
||||
// 开发打包开关
|
||||
localEnabled: true,
|
||||
localEnabled: true,
|
||||
// 生产打包开关
|
||||
prodEnabled: true,
|
||||
// 打开后,可以读取 ts 文件模块。 请注意,打开后将无法监视.js 文件
|
||||
supportTs: true,
|
||||
// 监视文件更改
|
||||
watchFiles: true,
|
||||
}),
|
||||
watchFiles: true
|
||||
}),
|
||||
// 压缩
|
||||
viteCompression({
|
||||
verbose: true,
|
||||
|
||||
Reference in New Issue
Block a user