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.
 
 
 
 
 

59 lines
1.6 KiB

/*
* @Author: Haiqiang
* @Date: 2021-04-09 12:05:01
* @LastEditors: Haiqiang
* @LastEditTime: 2021-04-13 16:11:29
* @Description:
*/
// const path = require('path')
module.exports = {
devServer: {
// headers: {
// 'Access-Control-Allow-Origin': '*'
// },
hot: true,
port: 8088,
open: true,
noInfo: false,
overlay: {
warnings: true,
errors: true
}
// proxy: {
// '/api': {
// target: 'http://nas.hzdl.biz:6224/', //代理地址,这里设置的地址会代替axios中设置的baseURL
// changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
// ws: true, // proxy websockets
// //pathRewrite方法重写url
// pathRewrite: {
// //'^/api': ''
// // pathRewrite: {'^/api': '/api'} //重写之后url为 http://192.168.1.16:8085/xxxx
// }
// }
// }
},
runtimeCompiler: true,
productionSourceMap: false
// 自动引入样式文件
// css: {
// requireModuleExtension: true,
// sourceMap: true,
// loaderOptions: {
// scss: {
// /*sass-loader 8.0语法 */
// //prependData: '@import "~@/styles/variables.scss";',
// /*sass-loader 9+写法 */
// additionalData(content, loaderContext) {
// const { resourcePath, rootContext } = loaderContext
// const relativePath = path.relative(rootContext, resourcePath)
// if (relativePath.replace(/\\/g, '/') !== 'src/styles/variables.scss')
// return '@import "~@/styles/variables.scss";' + content
// return content
// },
// },
// },
// },
}