From 0cada912e157851bd98b063fabe9cacdbde4e3f7 Mon Sep 17 00:00:00 2001 From: Vyacheslav Matyukhin Date: Sat, 18 Jun 2022 14:14:01 +0300 Subject: [PATCH] fix react externals in components --- packages/components/webpack.config.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/packages/components/webpack.config.js b/packages/components/webpack.config.js index 16898032..06980076 100644 --- a/packages/components/webpack.config.js +++ b/packages/components/webpack.config.js @@ -37,7 +37,17 @@ module.exports = { port: 9000, }, externals: { - react: "React", - "react-dom": "ReactDOM", + react: { + commonjs: "react", + commonjs2: "react", + amd: "react", + root: "React", + }, + "react-dom": { + commonjs: "react-dom", + commonjs2: "react-dom", + amd: "react-dom", + root: "ReactDOM", + }, }, };