Skip to content

Commit 27bde0d

Browse files
committed
Change browser build to UMD
1 parent d6840ff commit 27bde0d

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

webpack.config.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,17 @@ if (process.env.NODE_ENV === 'production') {
2020
);
2121
}
2222

23+
var reactExternal = {
24+
root: 'React',
25+
commonjs2: 'react',
26+
commonjs: 'react',
27+
amd: 'react'
28+
};
29+
2330
module.exports = {
2431
externals: {
25-
'react': 'React',
26-
'react-native': 'React'
32+
'react': reactExternal,
33+
'react-native': reactExternal
2734
},
2835
module: {
2936
loaders: [
@@ -32,7 +39,7 @@ module.exports = {
3239
},
3340
output: {
3441
library: 'Redux',
35-
libraryTarget: 'var'
42+
libraryTarget: 'umd'
3643
},
3744
plugins: plugins,
3845
resolve: {

0 commit comments

Comments
 (0)