Skip to content

Commit c9addd9

Browse files
committed
Fix external config for browsers.
1 parent eb7e68a commit c9addd9

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

webpack.config.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@ module.exports = {
1010
libraryTarget: 'umd'
1111
},
1212
externals: {
13-
'react': 'React'
13+
'react': {
14+
'commonjs': 'react',
15+
'commonjs2': 'react',
16+
'amd': 'react',
17+
// React dep should be available as window.React, not window.react
18+
'root': 'React'
19+
}
1420
},
1521
module: {
1622
loaders: [
@@ -22,11 +28,11 @@ module.exports = {
2228
]
2329
},
2430
resolve: {
25-
extensions: ["", ".webpack.js", ".web.js", ".js", ".es6"]
31+
extensions: ['', '.webpack.js', '.web.js', '.js', '.es6']
2632
},
2733
plugins: [
2834
new webpack.DefinePlugin({
29-
"process.env": {
35+
'process.env': {
3036
DRAGGABLE_DEBUG: process.env.DRAGGABLE_DEBUG
3137
}
3238
})

0 commit comments

Comments
 (0)