File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,10 @@ http.createServer(function (req, res) {
28
28
res . end ( html ) ;
29
29
} else if ( req . url == '/bundle.js' ) {
30
30
res . setHeader ( 'Content-Type' , 'text/javascript' ) ;
31
- browserify ( ) . add ( './browser.js' ) . transform ( literalify . configure ( { react : 'window.React' } ) ) . bundle ( ) . pipe ( res ) ;
31
+ browserify ( ) . add ( './browser.js' ) . transform ( literalify . configure ( {
32
+ 'react' : 'window.React' ,
33
+ 'react-dom' : 'window.ReactDOM'
34
+ } ) ) . bundle ( ) . pipe ( res ) ;
32
35
} else {
33
36
res . statusCode = 404 ;
34
37
res . end ( ) ;
Original file line number Diff line number Diff line change @@ -35,7 +35,10 @@ http.createServer(function(req, res) {
35
35
res . setHeader ( 'Content-Type' , 'text/javascript' ) ;
36
36
browserify ( )
37
37
. add ( './browser.js' )
38
- . transform ( literalify . configure ( { react : 'window.React' } ) )
38
+ . transform ( literalify . configure ( {
39
+ 'react' : 'window.React' ,
40
+ 'react-dom' : 'window.ReactDOM' ,
41
+ } ) )
39
42
. bundle ( )
40
43
. pipe ( res ) ;
41
44
} else {
You can’t perform that action at this time.
0 commit comments