12345678910111213141516171819202122232425262728293031 |
- import { defineConfig,loadEnv } from 'vite'
- import vue from '@vitejs/plugin-vue'
- // import styleImport from 'vite-plugin-style-import';
- import path from "path";
- // https://vitejs.dev/config/
- export default ({mode})=>defineConfig({
- base:loadEnv(mode, process.cwd()).VITE_APP_BASE_URL,
- plugins: [
- vue(),
- // styleImport({
- // libs: [
- // {
- // libraryName: 'vant',
- // esModule: true,
- // resolveStyle: (name) => `vant/es/${name}/style/index`,
- // },
- // ],
- // }),
- ],
- resolve: {
- alias: {
- "@": path.resolve(__dirname, "./src"),
- },
- },
- build:{
- outDir:loadEnv(mode, process.cwd()).VITE_APP_OUTDIR
- },
- server:{
- host:'0.0.0.0',
- }
- })
|