2019-09-09 17:00:25 +01:00
|
|
|
// Copyright (C) 2019 Storj Labs, Inc.
|
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
|
|
|
const path = require('path');
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
productionSourceMap: false,
|
|
|
|
parallel: true,
|
2022-04-06 16:51:04 +01:00
|
|
|
lintOnSave: process.env.NODE_ENV !== 'production', // disables eslint for builds
|
2022-11-04 11:48:16 +00:00
|
|
|
assetsDir: 'static',
|
2019-10-28 13:19:57 +00:00
|
|
|
configureWebpack: {
|
2021-10-11 10:16:01 +01:00
|
|
|
plugins: [],
|
2019-10-28 13:19:57 +00:00
|
|
|
},
|
2019-09-09 17:00:25 +01:00
|
|
|
chainWebpack: config => {
|
|
|
|
config.resolve.alias
|
|
|
|
.set('@', path.resolve('src'));
|
|
|
|
|
2022-04-06 16:51:04 +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')
|
2022-11-04 11:48:16 +00:00
|
|
|
.tap(options => Object.assign(options, { cacheDirectory: false }));
|
2022-04-06 16:51:04 +01:00
|
|
|
|
2019-09-09 17:00:25 +01:00
|
|
|
config
|
|
|
|
.plugin('html')
|
|
|
|
.tap(args => {
|
|
|
|
args[0].template = './index.html';
|
2022-04-06 16:51:04 +01:00
|
|
|
return args;
|
2019-09-09 17:00:25 +01:00
|
|
|
});
|
2019-10-25 10:53:35 +01:00
|
|
|
|
|
|
|
const svgRule = config.module.rule('svg');
|
|
|
|
svgRule.uses.clear();
|
2022-04-06 16:51:04 +01:00
|
|
|
svgRule.type(); // Disable webpack 5 asset management.
|
2019-10-25 10:53:35 +01:00
|
|
|
svgRule
|
2022-04-06 16:51:04 +01:00
|
|
|
.use('vue-loader')
|
|
|
|
.loader('vue-loader')
|
2019-11-22 17:22:37 +00:00
|
|
|
.end()
|
2019-10-25 10:53:35 +01:00
|
|
|
.use('vue-svg-loader')
|
|
|
|
.loader('vue-svg-loader');
|
2022-04-06 16:51:04 +01:00
|
|
|
},
|
2019-09-09 17:00:25 +01:00
|
|
|
};
|