File tree 2 files changed +10
-4
lines changed
2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 3
3
"version" : " 1.0.0" ,
4
4
"license" : " MIT" ,
5
5
"scripts" : {
6
- "start" : " parcel index.html"
6
+ "start" : " parcel index.html" ,
7
+ "start:prod" : " parcel build index.html" ,
8
+ "start:link" : " cp -R ../../dist ./node_modules/react-hot-loader && cp -R ../../*.js ./node_modules/react-hot-loader"
7
9
},
8
10
"devDependencies" : {
9
11
"babel-core" : " ^6.26.3" ,
Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
- var hasWindow = typeof window !== 'undefined' ;
4
-
5
- if ( ! module . hot || process . env . NODE_ENV === 'production' || ! hasWindow ) {
3
+ if ( process . env . NODE_ENV === 'production' ) {
4
+ module . exports = require ( './dist/react-hot-loader.production.min.js' ) ;
5
+ } else if ( ! module . hot ) {
6
+ console . error ( 'React-Hot-Loader: Hot Module Replacement is not enabled' ) ;
7
+ module . exports = require ( './dist/react-hot-loader.production.min.js' ) ;
8
+ } else if ( typeof window === 'undefined' ) {
9
+ // this is just server environment
6
10
module . exports = require ( './dist/react-hot-loader.production.min.js' ) ;
7
11
} else {
8
12
var evalAllowed = false ;
You can’t perform that action at this time.
0 commit comments