|
@@ -9,9 +9,6 @@ import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
|
|
|
import vueSetupExtend from 'vite-plugin-vue-setup-extend-plus'; // setup语法糖设置name
|
|
|
import viteCompression from "vite-plugin-compression"; //开启gzip打包压缩
|
|
|
export default defineConfig(({ command, mode }: ConfigEnv): UserConfig => {
|
|
|
-
|
|
|
- // const env = loadEnv(mode, process.cwd(), '')
|
|
|
- console.log(command, mode);
|
|
|
return {
|
|
|
plugins: [vue(),
|
|
|
vueSetupExtend(),
|
|
@@ -24,7 +21,7 @@ export default defineConfig(({ command, mode }: ConfigEnv): UserConfig => {
|
|
|
viteCompression()
|
|
|
],
|
|
|
publicDir: "public",
|
|
|
- base: "./",
|
|
|
+ base: command === 'serve' ? './' : '/',
|
|
|
server: {
|
|
|
host: '0.0.0.0',
|
|
|
port: 8113,
|