komga/komga-webui/vue.config.js

34 lines
858 B
JavaScript

// vue.config.js
module.exports = {
// with './' the dev server cannot load any arbitrary path
// with '/' the prod build generates some url(/fonts…) calls in the css chunks, which doesn't work with a servlet context path
publicPath: process.env.NODE_ENV === 'production' ? './' : '/',
pluginOptions: {
i18n: {
locale: 'en',
fallbackLocale: 'en',
localeDir: 'locales',
enableInSFC: false,
},
},
// custom rule for readium and r2d2bc css that needs to be made available, but untouched
configureWebpack: {
module: {
rules: [
{
test: [
/readium\/.*\.css.resource$/,
/r2d2bc\/.*\.css.resource$/,
],
type: 'asset/resource',
generator: {
filename: 'css/[hash].css[query]',
},
},
],
},
},
}