From 7ed9ba1934486268bb0c3b940563d38b35169669 Mon Sep 17 00:00:00 2001 From: Sarah Fischmann <sfischmann@edx.org> Date: Thu, 6 Jul 2017 10:06:45 -0400 Subject: [PATCH] Update webpack config and translation tools to translate .jsx files EDUCATOR-823 Updated confinguration of webpack and translation tools to work with jsx files EDUCATOR-823 changes to webpack config Fixed space issue --- conf/locale/babel_third_party.cfg | 3 +++ webpack.config.js | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/conf/locale/babel_third_party.cfg b/conf/locale/babel_third_party.cfg index 8a6a50af06b..e77f22e07a8 100644 --- a/conf/locale/babel_third_party.cfg +++ b/conf/locale/babel_third_party.cfg @@ -4,3 +4,6 @@ input_encoding = utf-8 [django: **/template/**.html] input_encoding = utf-8 + +[reactjs: **.jsx] +input_encoding = utf-8 diff --git a/webpack.config.js b/webpack.config.js index 546b91af28d..88f9810aa09 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -93,7 +93,7 @@ var wpconfig = { ) }, { - test: /\.js$/, + test: /\.(js|jsx)$/, exclude: [ /node_modules/, namespacedRequireFiles @@ -125,7 +125,7 @@ var wpconfig = { }, resolve: { - extensions: ['.js', '.json', '.coffee'], + extensions: ['.js', '.jsx', '.json', '.coffee'], alias: { 'edx-ui-toolkit': 'edx-ui-toolkit/src/', // @TODO: some paths in toolkit are not valid relative paths 'jquery.ui': 'jQuery-File-Upload/js/vendor/jquery.ui.widget.js', -- GitLab