Skip to content

Commit 506d82f

Browse files
committed
Correctly specify react and react-dom as externals
Previously, the syntax was incorrect and was not doing anything. Additionally, it was attempting to set them as externals in the playground builds, which is incorrect, they need to be included in the playground build.
1 parent 1fc2e39 commit 506d82f

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

webpack.config.js

+2-10
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ const base = {
2727
filename: '[name].js',
2828
chunkFilename: 'chunks/[name].js'
2929
},
30-
externals: {
31-
React: 'react',
32-
ReactDOM: 'react-dom'
33-
},
3430
resolve: {
3531
symlinks: false
3632
},
@@ -113,10 +109,6 @@ module.exports = [
113109
path: path.resolve(__dirname, 'build'),
114110
filename: '[name].js'
115111
},
116-
externals: {
117-
React: 'react',
118-
ReactDOM: 'react-dom'
119-
},
120112
module: {
121113
rules: base.module.rules.concat([
122114
{
@@ -200,8 +192,8 @@ module.exports = [
200192
publicPath: `${STATIC_PATH}/`
201193
},
202194
externals: {
203-
React: 'react',
204-
ReactDOM: 'react-dom'
195+
'react': 'react',
196+
'react-dom': 'react-dom'
205197
},
206198
module: {
207199
rules: base.module.rules.concat([

0 commit comments

Comments
 (0)