mirror of
https://github.com/jekip/naive-ui-admin.git
synced 2026-03-01 00:23:11 +08:00
1.9.0
This commit is contained in:
@@ -22,7 +22,7 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
|
||||
const root = process.cwd();
|
||||
const env = loadEnv(mode, root);
|
||||
const viteEnv = wrapperEnv(env);
|
||||
const { VITE_PUBLIC_PATH, VITE_DROP_CONSOLE, VITE_PORT, VITE_GLOB_PROD_MOCK, VITE_PROXY } =
|
||||
const { VITE_PUBLIC_PATH, VITE_PORT, VITE_GLOB_PROD_MOCK, VITE_PROXY } =
|
||||
viteEnv;
|
||||
const prodMock = VITE_GLOB_PROD_MOCK;
|
||||
const isBuild = command === 'build';
|
||||
@@ -46,26 +46,10 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
|
||||
define: {
|
||||
__APP_INFO__: JSON.stringify(__APP_INFO__),
|
||||
},
|
||||
// css: {
|
||||
// preprocessorOptions: {
|
||||
// less: {
|
||||
// modifyVars: {},
|
||||
// javascriptEnabled: true,
|
||||
// additionalData: `@import "src/styles/var.less";`,
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
server: {
|
||||
host: true,
|
||||
port: VITE_PORT,
|
||||
proxy: createProxy(VITE_PROXY),
|
||||
// proxy: {
|
||||
// '/api': {
|
||||
// target: '',
|
||||
// changeOrigin: true,
|
||||
// rewrite: (path) => path.replace(/^\/api/, '/api/v1')
|
||||
// }
|
||||
// }
|
||||
},
|
||||
optimizeDeps: {
|
||||
include: [],
|
||||
@@ -75,12 +59,6 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
|
||||
target: 'es2015',
|
||||
cssTarget: 'chrome80',
|
||||
outDir: OUTPUT_DIR,
|
||||
// terserOptions: {
|
||||
// compress: {
|
||||
// keep_infinity: true,
|
||||
// drop_console: VITE_DROP_CONSOLE,
|
||||
// },
|
||||
// },
|
||||
reportCompressedSize: false,
|
||||
chunkSizeWarningLimit: 2000,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user