12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- var path = require('path')
- function resolve (dir) {
- return path.join(__dirname, dir)
- }
- module.exports = {
- // 输出文件目录
- outputDir: '../../bmclinxupro/app/goahead-3.6.5/src/web',
- devServer: {
- host: '127.0.0.1',
- port: 9999,
- proxy: {
- '/action': {
- target: 'http://192.168.1.121/',
- ws: true,
- changeOrigin: true,
- },
-
- }
- },
- productionSourceMap: false,
- assetsDir:'static',
- chainWebpack: (config) => {
- config.resolve.alias
- .set('@', resolve('src'))
- .set('assets', resolve('src/assets'))
- .set('components', resolve('src/components'))
- if (process.env.NODE_ENV === 'production') {
- // 清除css,js版本号
- config.output.filename('static/js/[name].js').end();
- config.output.chunkFilename('static/js/[name].js').end();
- // 为生产环境修改配置...
- config.plugin('extract-css').tap(args => [{
- filename: `static/css/[name].css`,
- chunkFilename: `static/css/[name].css`
- }])
- }
- },
- lintOnSave: false
- }
|