storj/web/multinode/vue.config.js
Egon Elbre 28c9403702 multinode,web/multinode: use go:embed for assets
Go can now directly embed files without relying on external tools.
This makes code use go:embed and avoid the external tooling.

go:embed requires files to be present in the embedded directory,
hence we need to add .keep to "dist" folder. We also add one to
public/.keep, such that it won't be deleted when building multinode.

Change-Id: I53ac3d5ac76e44f740d95221acf0da99fc256d42
2022-03-11 11:10:37 +02:00

37 lines
854 B
JavaScript

// Copyright (C) 2020 Storj Labs, Inc.
// See LICENSE for copying information.
const path = require('path');
module.exports = {
productionSourceMap: false,
parallel: true,
lintOnSave: false, // disables eslint for builds
assetsDir: "static",
configureWebpack: {
plugins: [],
},
chainWebpack: config => {
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');
},
};