12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- const { defineConfig } = require("@vue/cli-service")
- module.exports = defineConfig({
- transpileDependencies: true,
- productionSourceMap: false,
- css: {
- loaderOptions: {
- //全局变量
- sass: {
- additionalData: `@use "@/assets/variables.scss" as *;`
- },
- postcss: {
- postcssOptions: {
- plugins: [
- require("postcss-pxtorem")({
- rootValue: 18, // 换算的基数
- selectorBlackList: ["-nopx"], // 忽略转换正则匹配项 列入一些ui库, ['.el'] 就是忽略elementUI库
- propList: ["*"],
- exclude: file => {
- if (file.includes("coursewarePlay")) {
- return true
- }
- if (file.includes("globalTools")) {
- return true
- }
- if (file.includes("normalize")) {
- return true
- }
- return false
- }
- })
- ]
- }
- }
- }
- },
- devServer: {
- proxy: {
- "/gym": {
- target: "https://dev.gym.lexiaoya.cn",
- pathRewrite: {
- "^/gym": ""
- }
- },
- "/gyt": {
- target: "https://dev.lexiaoya.cn",
- pathRewrite: {
- "^/gyt": ""
- }
- },
- "/klx": {
- target: "https://dev.colexiu.com",
- pathRewrite: {
- "^/klx": ""
- }
- }
- }
- }
- })
|