2020-12-17 17:11:01 +00:00
|
|
|
// Copyright (C) 2020 Storj Labs, Inc.
|
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
|
|
|
const path = require('path');
|
|
|
|
const StyleLintPlugin = require('stylelint-webpack-plugin');
|
|
|
|
|
|
|
|
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,
|
|
|
|
configureWebpack: {
|
|
|
|
plugins: [
|
|
|
|
new StyleLintPlugin({
|
|
|
|
files: ['**/*.{vue,sss,less,scss,sass}'],
|
2021-08-02 18:09:54 +01:00
|
|
|
ignoreFiles: ['./node_modules/**'],
|
2020-12-17 17:11:01 +00:00
|
|
|
emitWarning: true,
|
2021-08-02 18:09:54 +01:00
|
|
|
}),
|
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
|
|
|
};
|