storj/web/storagenode/vue.config.js
Egon Elbre dc0f7b5f77 storagenode,web/storagenode: 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 storagenode.

Change-Id: I8bef81236be6829ed37ed4c16ef693677b93a631
2022-03-11 16:01:28 +02:00

37 lines
852 B
JavaScript

// Copyright (C) 2019 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');
}
};