Semaphore/web/vue.config.js
Thomas Boerger 67954b95aa
feat: replace packr and add basic cache headers
Since packr have been deprecated in favor of go:embed for quite some
time now I have replaced it with plain go:embed functionality which
makes it more future proof.

The only downside is that go:embed can use relativ paths only, that's
why I have moved the web/dist folder into api/public.

Besides that I have refactored the static asset handling which includes
basic last modification and cache control headers to improve the cache
cache behavior for static assets.
2024-03-01 15:52:30 +01:00

26 lines
500 B
JavaScript

module.exports = {
configureWebpack: {
devServer: {
historyApiFallback: true,
proxy: {
'^/api': {
target: 'http://localhost:3000',
},
},
},
},
chainWebpack: (config) => {
config.plugin('html')
.tap((args) => {
// eslint-disable-next-line no-param-reassign
args[0].minify = false;
return args;
});
},
transpileDependencies: [
'vuetify',
],
publicPath: './',
outputDir: '../api/public',
};