🔧工具(deps): update vite.config.mts

This commit is contained in:
2024-03-21 15:29:14 +08:00
parent 2b1c06608b
commit 03ac006f04
5 changed files with 462 additions and 4 deletions

View File

@@ -31,6 +31,15 @@ export default defineConfig(({ mode, command }) => {
}
},
css: {
// CSS 预处理器
preprocessorOptions: {
//define global less variable
less: {
javascriptEnabled: true,
charset: false, //禁用字符集声明(charset 选项用于控制是否在生成的 CSS 文件的头部添加 @charset "UTF-8";)
additionalData: '@import "./src/style/variables.less";'
}
},
postcss: {
plugins: [
autoprefixer({
@@ -116,12 +125,12 @@ export default defineConfig(({ mode, command }) => {
}),
AutoImport({
//安装两行后你会发现在组件中不用再导入refreactive等
imports: ['vue', 'vue-router'],
imports: ['vue', 'vue-router','@vueuse/core'],
dts: 'auto-import.d.ts',
//ant-design-vue
resolvers: [AntDesignVueResolver()],
eslintrc: {
enabled: false // 1、改为true用于生成eslint配置。2、生成后改回false避免重复生成消耗
enabled: true // 1、改为true用于生成eslint配置。2、生成后改回false避免重复生成消耗
}
}),