코드 정리
This commit is contained in:
+20
-22
@@ -1,63 +1,61 @@
|
||||
import path from "path"
|
||||
import react from '@vitejs/plugin-react'
|
||||
import { defineConfig } from 'vite'
|
||||
import monacoEditorPlugin from './vite.monaco-editor';
|
||||
import path from 'path';
|
||||
import react from '@vitejs/plugin-react';
|
||||
import {defineConfig} from 'vite';
|
||||
|
||||
export default defineConfig({
|
||||
define: {
|
||||
global: {},
|
||||
global: {}
|
||||
},
|
||||
plugins: [react(),monacoEditorPlugin()],
|
||||
plugins: [react()],
|
||||
resolve: {
|
||||
alias: {
|
||||
"@": path.resolve(__dirname, "./src"),
|
||||
},
|
||||
'@': path.resolve(__dirname, './src')
|
||||
}
|
||||
},
|
||||
server: {
|
||||
proxy: {
|
||||
'/mgmt': {
|
||||
target: 'http://localhost:38080',
|
||||
changeOrigin: true,
|
||||
secure: false,
|
||||
secure: false
|
||||
},
|
||||
'/api': {
|
||||
target: 'http://localhost:38080',
|
||||
changeOrigin: true,
|
||||
secure: false,
|
||||
secure: false
|
||||
},
|
||||
'/actionLogin.do': {
|
||||
target: 'http://localhost:38080',
|
||||
changeOrigin: true,
|
||||
secure: false,
|
||||
secure: false
|
||||
},
|
||||
'/actionLogout.do': {
|
||||
target: 'http://localhost:38080',
|
||||
changeOrigin: true,
|
||||
secure: false,
|
||||
secure: false
|
||||
},
|
||||
'/img': {
|
||||
target: 'http://localhost:38080',
|
||||
changeOrigin: true,
|
||||
secure: false,
|
||||
secure: false
|
||||
},
|
||||
'/servers': {
|
||||
target: 'http://localhost:38080',
|
||||
changeOrigin: true,
|
||||
secure: false,
|
||||
secure: false
|
||||
}
|
||||
}
|
||||
},
|
||||
optimizeDeps: {
|
||||
include: ['@monaco-editor/react'],
|
||||
include: ['@monaco-editor/react']
|
||||
},
|
||||
build: {
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks: {
|
||||
// Split Monaco Editor into a separate chunk
|
||||
'monaco-editor': ['monaco-editor'],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
'monaco-editor': ['monaco-editor/esm/vs/editor/editor.api']
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user