From 241ba37f44207c52947d1f04f1d6b02a3a3e626c Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Fri, 15 Feb 2019 20:56:15 +0100 Subject: [PATCH] dont run file loader on locales jsons --- webpack/local.babel.js | 3 ++- webpack/production.babel.js | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/webpack/local.babel.js b/webpack/local.babel.js index 2fec2086..5f5d7951 100644 --- a/webpack/local.babel.js +++ b/webpack/local.babel.js @@ -13,6 +13,7 @@ import { SRC, BUILD, PUBLIC, + TRANSLATIONS, PORT, } from './constants'; @@ -83,7 +84,7 @@ module.exports = { { type: 'javascript/auto', test: /\.json/, - exclude: /(node_modules)/, + exclude: [/(node_modules)/, TRANSLATIONS], loader: 'file-loader', options: { outputPath: './data', diff --git a/webpack/production.babel.js b/webpack/production.babel.js index 0a6bc979..aba7935d 100644 --- a/webpack/production.babel.js +++ b/webpack/production.babel.js @@ -3,7 +3,9 @@ import GitRevisionPlugin from 'git-revision-webpack-plugin'; import HtmlWebpackPlugin from 'html-webpack-plugin'; import FriendlyErrorsWebpackPlugin from 'friendly-errors-webpack-plugin'; import CopyWebpackPlugin from 'copy-webpack-plugin'; -import { SRC, BUILD, PUBLIC } from './constants'; +import { + SRC, BUILD, PUBLIC, TRANSLATIONS, +} from './constants'; const gitRevisionPlugin = new GitRevisionPlugin(); @@ -44,7 +46,7 @@ module.exports = { { type: 'javascript/auto', test: /\.json/, - exclude: /(node_modules)/, + exclude: [/(node_modules)/, TRANSLATIONS], loader: 'file-loader', options: { outputPath: './data',