bc6d8c06e3
Stylelint and eslint should be run separately and not part of the build process. Add a flag STORJ_DEBUG_BUNDLE_SIZE to debug compiled bundle size. Reduce the number of chunks, it's far from ideal. Once we reduce the images and browser size, we probably can drop chunking altogether. Change-Id: I5bdf35ceb140e2c47a30df8d319606d05bfb30dd
40 lines
973 B
JavaScript
40 lines
973 B
JavaScript
// Copyright (C) 2019 Storj Labs, Inc.
|
|
// See LICENSE for copying information.
|
|
|
|
const path = require('path');
|
|
|
|
module.exports = {
|
|
publicPath: "/static/dist",
|
|
productionSourceMap: false,
|
|
parallel: true,
|
|
lintOnSave: false, // disables eslint for builds
|
|
configureWebpack: {
|
|
plugins: [],
|
|
},
|
|
chainWebpack: config => {
|
|
config.output.chunkFilename(`js/vendors_[hash].js`);
|
|
config.output.filename(`js/app_[hash].js`);
|
|
|
|
config.resolve.alias
|
|
.set('@', path.resolve('src'));
|
|
|
|
config
|
|
.plugin('html')
|
|
.tap(args => {
|
|
args[0].template = './index.html';
|
|
return args
|
|
});
|
|
|
|
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');
|
|
}
|
|
};
|