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 = {
|
|
|
|
productionSourceMap: false,
|
|
|
|
parallel: true,
|
2022-03-29 15:18:11 +01:00
|
|
|
lintOnSave: process.env.NODE_ENV !== 'production', // disables eslint for builds
|
2022-03-10 15:28:10 +00:00
|
|
|
assetsDir: "static",
|
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 => {
|
|
|
|
config.resolve.alias
|
|
|
|
.set('@', path.resolve('src'));
|
|
|
|
|
2022-03-29 15:18:11 +01:00
|
|
|
// Disable node_modules/.cache directory usage due to permissions.
|
|
|
|
// This is enabled by default in https://cli.vuejs.org/core-plugins/babel.html#caching.
|
|
|
|
config.module.rule('js').use('babel-loader')
|
|
|
|
.tap(options => Object.assign(options, {cacheDirectory: false}));
|
|
|
|
|
2020-12-17 17:11:01 +00:00
|
|
|
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();
|
2022-03-29 15:18:11 +01:00
|
|
|
svgRule.type(); // Disable webpack 5 asset management.
|
2020-12-29 17:59:57 +00:00
|
|
|
svgRule
|
2022-03-29 15:18:11 +01:00
|
|
|
.use('vue-loader')
|
|
|
|
.loader('vue-loader')
|
2020-12-29 17:59:57 +00:00
|
|
|
.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
|
|
|
};
|