Webpack config in dev and prod include copywebpack for static translations.json

Change in i18n to serve the translations from a different path
This commit is contained in:
oruburos 2020-07-10 17:08:47 +01:00
parent 78f87b6ec1
commit 348056ecf9

View file

@ -75,7 +75,7 @@ app.use(corsMiddleware);
app.options('*', corsMiddleware); app.options('*', corsMiddleware);
// Body parser, cookie parser, sessions, serve public assets // Body parser, cookie parser, sessions, serve public assets
app.use('/translations', Express.static('translations/locales/')); app.use('/locales', Express.static(path.resolve(__dirname, '../dist/static/locales'), { cacheControl: false }));
app.use(Express.static(path.resolve(__dirname, '../dist/static'), { app.use(Express.static(path.resolve(__dirname, '../dist/static'), {
maxAge: process.env.STATIC_MAX_AGE || (process.env.NODE_ENV === 'production' ? '1d' : '0') maxAge: process.env.STATIC_MAX_AGE || (process.env.NODE_ENV === 'production' ? '1d' : '0')
})); }));