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.

61 lines
1.6 KiB

const define = require('./src/utils/define.js')
let scssVariables = require('./src/styles/scss.variables.js');
module.exports = {
publicPath: '/DataV',
outputDir: 'dist',
runtimeCompiler: true,
lintOnSave: false,
css: {
loaderOptions: {
sass: {
implementation: require('sass'), // This line must in sass option
},
scss: {
prependData: '@import "@/styles/echart.scss";\n' +
Object.keys(scssVariables)
.map(k => {
let newK = k;
// eslint-disable-next-line no-useless-escape
return `\$${newK.replace('_', '-')}: "${scssVariables[k]}";`
})
.join('\n')
}
}
},
transpileDependencies: [
'monaco-editor',
'@jiaminghi/data-view'
],
// 跨域
devServer: {
open: false,
port: 8100,
overlay: {
warnings: false,
errors: true
},
// 接口转发
proxy: {
'/dev': {
target: define.APIURl,
changeOrigin: true,
pathRewrite: {
'^/dev': ''
}
}
}
},
chainWebpack: (config) => {
//忽略的打包文件
config.externals({
'vue': 'Vue',
'vue-router': 'VueRouter',
'vuex': 'Vuex',
'axios': 'axios',
'element-ui': 'ELEMENT',
})
}
}