| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 | 
							- const { defineConfig } = require('@vue/cli-service')
 
- module.exports = defineConfig({
 
-   transpileDependencies: true,
 
-   devServer: {
 
-     host: 'localhost', //可以忽略不写
 
-     port: 8101, //它是用来修改你打开后的端口号的
 
-     open: true, //值为 true的话,项目启动时自动打开到浏览器里边, false不会打开
 
-     proxy: {
 
-       ['/api/als']: {
 
-         target: 'http://localhost:9090',
 
-         ws: false, //也可以忽略不写,不写不会影响跨域
 
-         changeOrigin: true, //是否开启跨域,值为 true 就是开启, false 不开启
 
-         pathRewrite: {
 
-           ['^' + '/api/als']: '/als'
 
-         }
 
-       },
 
-       [process.env.VUE_APP_BASE_API]: {
 
-         target: process.env.VUE_APP_BASE_API_target,
 
-         ws: false, //也可以忽略不写,不写不会影响跨域
 
-         changeOrigin: true, //是否开启跨域,值为 true 就是开启, false 不开启
 
-         pathRewrite: {
 
-           ['^' + process.env.VUE_APP_BASE_API]: ''
 
-         }
 
-       }
 
-     }
 
-   },
 
-   //全局 sass的配置
 
-   chainWebpack(config) {
 
-     globalSass(config)
 
-   }
 
- })
 
- /**
 
-  * 注意Dependencies需要引入
 
-  * "sass": "^1.32.7",
 
-  *"sass-loader": "^12.0.0",
 
-  *"sass-resources-loader": "^2.2.5"
 
-  * 全局变量的Sass引方法
 
-  * @param config  chainWebpack(config) 中来的一个配置
 
-  */
 
- const globalSass = (config) => {
 
-   const oneOfsMap = config.module.rule('scss').oneOfs.store
 
-   oneOfsMap.forEach((item) => {
 
-     item
 
-       .use('sass-resources-loader')
 
-       .loader('sass-resources-loader')
 
-       .options({
 
-         resources: './src/style/index.scss' //相对路径
 
-       })
 
-       .end()
 
-   })
 
- }
 
 
  |