|
@@ -2,6 +2,7 @@ import { defineConfig } from 'vite'
|
|
|
import vue from '@vitejs/plugin-vue'
|
|
import vue from '@vitejs/plugin-vue'
|
|
|
import eslint from 'vite-plugin-eslint'
|
|
import eslint from 'vite-plugin-eslint'
|
|
|
import path from 'path'
|
|
import path from 'path'
|
|
|
|
|
+import viteCompression from 'vite-plugin-compression'
|
|
|
|
|
|
|
|
// https://vitejs.dev/config/
|
|
// https://vitejs.dev/config/
|
|
|
export default defineConfig({
|
|
export default defineConfig({
|
|
@@ -15,7 +16,7 @@ export default defineConfig({
|
|
|
'@': path.resolve(__dirname, './src')
|
|
'@': path.resolve(__dirname, './src')
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- plugins: [vue(), eslint({ fix: true, include: ['**/*.ts', '**/*.vue'] })],
|
|
|
|
|
|
|
+ plugins: [vue(), viteCompression(), eslint({ fix: true, include: ['**/*.ts', '**/*.vue'] })],
|
|
|
server: {
|
|
server: {
|
|
|
host: 'localhost',
|
|
host: 'localhost',
|
|
|
port: 6547,
|
|
port: 6547,
|
|
@@ -34,7 +35,6 @@ export default defineConfig({
|
|
|
build: {
|
|
build: {
|
|
|
rollupOptions: {
|
|
rollupOptions: {
|
|
|
input: {
|
|
input: {
|
|
|
- admin: path.resolve(__dirname, 'admin.html'),
|
|
|
|
|
index: path.resolve(__dirname, 'index.html'),
|
|
index: path.resolve(__dirname, 'index.html'),
|
|
|
login: path.resolve(__dirname, 'login.html')
|
|
login: path.resolve(__dirname, 'login.html')
|
|
|
},
|
|
},
|
|
@@ -51,4 +51,7 @@ export default defineConfig({
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ define: {
|
|
|
|
|
+ __VUE_OPTIONS_API__: false
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|