4.23
This commit is contained in:
+12
-16
@@ -1,9 +1,8 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import { resolve } from "path"
|
||||
|
||||
import styleImport, { VantResolve } from 'vite-plugin-style-import';
|
||||
import { defineConfig } from "vite";
|
||||
import vue from "@vitejs/plugin-vue";
|
||||
import { resolve } from "path";
|
||||
|
||||
import styleImport, { VantResolve } from "vite-plugin-style-import";
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
@@ -13,19 +12,17 @@ export default defineConfig({
|
||||
resolves: [VantResolve()],
|
||||
libs: [
|
||||
{
|
||||
libraryName: 'vant',
|
||||
libraryName: "vant",
|
||||
esModule: true,
|
||||
resolveStyle: (name) => `../es/${name}/style`, //https://blog.csdn.net/yunchong_zhao/article/details/123552423
|
||||
},
|
||||
|
||||
],
|
||||
|
||||
}),
|
||||
|
||||
],
|
||||
server: {
|
||||
host: '0.0.0.0',//设置地址:http://localhost
|
||||
host: "0.0.0.0", //设置地址:http://localhost
|
||||
port: 4000, // 设置服务启动端口号
|
||||
hmr: false, // 关闭热更新
|
||||
// open: true, // 设置服务启动时是否自动打开浏览器
|
||||
// cors: true, // 允许跨域
|
||||
// proxy: {
|
||||
@@ -38,10 +35,10 @@ export default defineConfig({
|
||||
// }
|
||||
// }
|
||||
},
|
||||
resolve:{
|
||||
alias:{
|
||||
"@": resolve(__dirname, "src")
|
||||
}
|
||||
resolve: {
|
||||
alias: {
|
||||
"@": resolve(__dirname, "src"),
|
||||
},
|
||||
},
|
||||
css: {
|
||||
// css预处理器
|
||||
@@ -52,5 +49,4 @@ export default defineConfig({
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
})
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user