mirror of
https://github.com/misenhower/splatoon2.ink.git
synced 2026-04-26 01:20:38 -05:00
Disable language chunks to fix build issues
We don't need to prefetch all the languages on every page load, but there are currently some issues with modifying webpack plugin configs when using the --modern build option.
This commit is contained in:
parent
3cfec6d8f2
commit
44bc51f0a0
|
|
@ -1,6 +1,9 @@
|
|||
export default {
|
||||
loadLocale({ dispatch }, locale) {
|
||||
import(/* webpackChunkName: "lang-[request]" */ `@/web/locale/${locale}`)
|
||||
.then(translations => dispatch('addLocale', { locale, translations: translations.default }));
|
||||
// Disabling this for now due to issues with disabling prefetching with the modern build (see vue.config.js)
|
||||
// import(/* webpackChunkName: "lang-[request]" */ `@/web/locale/${locale}`)
|
||||
// .then(translations => dispatch('addLocale', { locale, translations: translations.default }));
|
||||
|
||||
dispatch('addLocale', { locale, translations: require(`@/web/locale/${locale}`) });
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,13 +43,14 @@ module.exports = {
|
|||
}),
|
||||
]
|
||||
},
|
||||
chainWebpack: config => {
|
||||
config.plugin('prefetch-index').tap(options => {
|
||||
options[0].fileBlacklist = options[0].fileBlacklist || [];
|
||||
options[0].fileBlacklist.push(/lang-.+?\.js$/);
|
||||
return options;
|
||||
});
|
||||
},
|
||||
// Disabling this for now due to issues with the modern build
|
||||
// chainWebpack: config => {
|
||||
// config.plugin('prefetch-index').tap(options => {
|
||||
// options[0].fileBlacklist = options[0].fileBlacklist || [];
|
||||
// options[0].fileBlacklist.push(/lang-.+?\.js$/);
|
||||
// return options;
|
||||
// });
|
||||
// },
|
||||
devServer: {
|
||||
contentBase: [
|
||||
'./public',
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user