2024-04-06 16:06:06 +08:00
|
|
|
import { defineConfig, loadEnv } from 'vite'
|
2024-03-30 09:23:34 +08:00
|
|
|
import vue from '@vitejs/plugin-vue'
|
|
|
|
|
|
|
|
// https://vitejs.dev/config/
|
2024-04-06 16:06:06 +08:00
|
|
|
export default ({ mode }) => defineConfig({
|
2024-03-30 09:23:34 +08:00
|
|
|
plugins: [vue()],
|
2024-04-06 10:21:06 +08:00
|
|
|
base: './',
|
2024-04-06 16:06:06 +08:00
|
|
|
build: {
|
|
|
|
outDir: loadEnv(mode, process.cwd()).VITE_NOW_TYPE
|
|
|
|
},
|
2024-04-01 17:45:21 +08:00
|
|
|
server: {
|
2024-05-09 14:34:42 +08:00
|
|
|
port: '5178',
|
2024-04-01 17:45:21 +08:00
|
|
|
host: '0.0.0.0',
|
|
|
|
},
|
2024-03-30 18:04:30 +08:00
|
|
|
resolve: {
|
|
|
|
alias: {
|
|
|
|
'@': '/src'
|
|
|
|
}
|
2024-04-20 09:54:56 +08:00
|
|
|
},
|
|
|
|
css: {
|
|
|
|
loaderOptions: {
|
|
|
|
postcss: {
|
|
|
|
config: {
|
|
|
|
path: './postcss.config.js',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2024-03-30 09:23:34 +08:00
|
|
|
})
|