From fabd0461c0a64efb3fcde4cb7cfd661249110586 Mon Sep 17 00:00:00 2001 From: Samuel Gratzl Date: Fri, 10 Mar 2017 10:12:22 +0100 Subject: [PATCH] fix webpack external for react --- webpack.config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index 52cbe210e..27d95204c 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -36,8 +36,8 @@ function generate(bundle, min) { //rest depends on type ], externals: { //react always external - react: { amd: 'react', global: 'React', commonjs: 'react' }, - 'react-dom': { amd: 'react-dom', global: 'ReactDOM', commonjs: 'react-dom' } + react: { amd: 'react', root: 'React', commonjs: 'react', commonjs2: 'react' }, + 'react-dom': { amd: 'react-dom', root: 'ReactDOM', commonjs: 'react-dom', commonjs2: 'react-dom' } }, module: { loaders: [