update 升级部分依赖,优化eslint语法以及scss语法

This commit is contained in:
LiuHao
2025-02-25 13:30:57 +08:00
parent cc38d23d14
commit aef5a02097
10 changed files with 93 additions and 123 deletions

View File

@ -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: {