diff --git a/scripts/webpack/webpack-resources.js b/scripts/webpack/webpack-resources.js index 48d62bbb083d68..0f3218fc497f7b 100644 --- a/scripts/webpack/webpack-resources.js +++ b/scripts/webpack/webpack-resources.js @@ -205,8 +205,16 @@ module.exports = { : output, externals: { - react: 'React', - 'react-dom': 'ReactDOM', + react: { + commonjs: 'react', + amd: 'react', + root: 'React', + }, + 'react-dom': { + commonjs: 'react-dom', + amd: 'react-dom', + root: 'ReactDOM', + }, }, resolve: {