尚硅谷--管理系统
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
801 B

3 months ago
//配置代理跨域等
3 months ago
// vite.config.ts
3 months ago
import { defineConfig } from 'vite'
2 months ago
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
3 months ago
import vue from '@vitejs/plugin-vue'
3 months ago
import path from 'path'
3 months ago
export default defineConfig({
2 months ago
plugins: [
vue(),
createSvgIconsPlugin({
// Specify the icon folder to be cached
iconDirs: [path.resolve(process.cwd(), 'src/assets/icons')],
// Specify symbolId format
symbolId: 'icon-[dir]-[name]',
}),
],
3 months ago
resolve: {
alias: {
'@': path.resolve('./src'), // 相对路径别名配置,使用 @ 代替 src
},
},
2 months ago
//scss全局变量的配置
css: {
preprocessorOptions: {
scss: {
javascriptEnabled: true,
additionalData: '@import "./src/styles/variable.scss";',
},
},
},
3 months ago
})