2020-12-17 17:11:01 +00:00
|
|
|
// Copyright (C) 2020 Storj Labs, Inc.
|
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
|
|
|
const path = require('path');
|
|
|
|
|
|
|
|
module.exports = {
|
2021-08-02 18:09:54 +01:00
|
|
|
publicPath: '/static/dist',
|
2020-12-17 17:11:01 +00:00
|
|
|
productionSourceMap: false,
|
|
|
|
parallel: true,
|
2021-10-11 10:16:01 +01:00
|
|
|
lintOnSave: false, // disables eslint for builds
|
2020-12-17 17:11:01 +00:00
|
|
|
configureWebpack: {
|
2021-10-11 10:16:01 +01:00
|
|
|
plugins: [],
|
2020-12-17 17:11:01 +00:00
|
|
|
},
|
|
|
|
chainWebpack: config => {
|
2021-08-02 18:09:54 +01:00
|
|
|
config.output.chunkFilename('js/vendors_[hash].js');
|
|
|
|
config.output.filename('js/app_[hash].js');
|
2020-12-17 17:11:01 +00:00
|
|
|
|
|
|
|
config.resolve.alias
|
|
|
|
.set('@', path.resolve('src'));
|
|
|
|
|
|
|
|
config
|
|
|
|
.plugin('html')
|
|
|
|
.tap(args => {
|
|
|
|
args[0].template = './index.html';
|
2021-08-02 18:09:54 +01:00
|
|
|
|
|
|
|
return args;
|
2020-12-17 17:11:01 +00:00
|
|
|
});
|
2020-12-29 17:59:57 +00:00
|
|
|
|
|
|
|
const svgRule = config.module.rule('svg');
|
|
|
|
|
|
|
|
svgRule.uses.clear();
|
|
|
|
|
|
|
|
svgRule
|
|
|
|
.use('babel-loader')
|
|
|
|
.loader('babel-loader')
|
|
|
|
.end()
|
|
|
|
.use('vue-svg-loader')
|
|
|
|
.loader('vue-svg-loader');
|
2021-08-02 18:09:54 +01:00
|
|
|
},
|
2020-12-17 17:11:01 +00:00
|
|
|
};
|