update 升级部分依赖,优化eslint语法以及scss语法
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import { UserConfig, ConfigEnv, loadEnv, defineConfig } from 'vite';
|
||||
|
||||
import { type UserConfig, type ConfigEnv, loadEnv, defineConfig } from 'vite';
|
||||
import createPlugins from './vite/plugins';
|
||||
import autoprefixer from 'autoprefixer'; // css自动添加兼容性前缀
|
||||
|
||||
import path from 'path';
|
||||
export default defineConfig(({ mode, command }: ConfigEnv): UserConfig => {
|
||||
@ -35,11 +35,17 @@ export default defineConfig(({ mode, command }: ConfigEnv): UserConfig => {
|
||||
css: {
|
||||
preprocessorOptions: {
|
||||
scss: {
|
||||
javascriptEnabled: true
|
||||
// additionalData: '@use "@/assets/styles/variables.module.scss as *";'
|
||||
// javascriptEnabled: true
|
||||
api: 'modern-compiler'
|
||||
}
|
||||
},
|
||||
postcss: {
|
||||
plugins: [
|
||||
// 浏览器兼容性
|
||||
autoprefixer({
|
||||
overrideBrowserslist: ['Android 4.1', 'iOS 7.1', 'Chrome > 31', 'ff > 31', 'ie >= 8']
|
||||
}),
|
||||
{
|
||||
postcssPlugin: 'internal:charset-removal',
|
||||
AtRule: {
|
||||
|
Reference in New Issue
Block a user