You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
73 lines
2.4 KiB
JavaScript
73 lines
2.4 KiB
JavaScript
module.exports = {
|
|
css: {
|
|
// 启用 CSS modules
|
|
requireModuleExtension: true,
|
|
// 是否使用css分离插件
|
|
extract: false,
|
|
// 开启 CSS source maps?
|
|
sourceMap: false,
|
|
// css预设器配置项
|
|
loaderOptions: {
|
|
sass: {
|
|
prependData: `@import "~@/assets/scss/style.scss";`
|
|
},
|
|
less: {
|
|
lessOptions: {
|
|
// If you are using less-loader@5 please spread the lessOptions to options directly
|
|
// 动态设置and主题颜色
|
|
// modifyVars: {},
|
|
javascriptEnabled: true,
|
|
},
|
|
},
|
|
}
|
|
},
|
|
productionSourceMap: process.env.NODE_ENV === 'production' ? false : true,
|
|
devServer: {
|
|
proxy: {
|
|
'/api/node': {
|
|
target: 'http://127.0.0.1:8117',
|
|
logLevel:'debug', //控制台终端打印代理前的真实地址
|
|
pathRewrite:{
|
|
'/api/node':''
|
|
}
|
|
},
|
|
'/api/pic': {
|
|
target: 'http://192.168.77.91:9007/api/pic',
|
|
logLevel:'debug',
|
|
pathRewrite:{
|
|
'/api/pic':''
|
|
}
|
|
},
|
|
'/api/mp4': {
|
|
target: 'http://192.168.77.91:9007/api/mp4',
|
|
logLevel:'debug',
|
|
pathRewrite:{
|
|
'/api/mp4':''
|
|
}
|
|
},
|
|
'/api': {
|
|
target: 'http://127.0.0.1:8099',
|
|
// target: 'http://115.236.65.98:13001/monitor',
|
|
// target: 'http://127.0.0.1:9007',
|
|
logLevel:'debug', //控制台终端打印代理前的真实地址
|
|
},
|
|
|
|
|
|
},
|
|
port: 8008
|
|
},
|
|
// configureWebpack: config => {
|
|
// // 生产去除日志
|
|
// if (process.env.NODE_ENV === 'production') {
|
|
// config.optimization.minimizer[0].options.terserOptions.compress.warnings = false
|
|
// config.optimization.minimizer[0].options.terserOptions.compress.drop_console =
|
|
// true
|
|
// config.optimization.minimizer[0].options.terserOptions.compress.drop_debugger =
|
|
// true
|
|
// config.optimization.minimizer[0].options.terserOptions.compress.pure_funcs = [
|
|
// 'console.log'
|
|
// ]
|
|
// }
|
|
// },
|
|
};
|