From 348056ecf99886cc526269cf550b38b18243f7b9 Mon Sep 17 00:00:00 2001 From: oruburos Date: Fri, 10 Jul 2020 17:08:47 +0100 Subject: [PATCH] Webpack config in dev and prod include copywebpack for static translations.json Change in i18n to serve the translations from a different path --- server/server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/server.js b/server/server.js index b50bcca1..b78469a6 100644 --- a/server/server.js +++ b/server/server.js @@ -75,7 +75,7 @@ app.use(corsMiddleware); app.options('*', corsMiddleware); // 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'), { maxAge: process.env.STATIC_MAX_AGE || (process.env.NODE_ENV === 'production' ? '1d' : '0') }));