File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 5
5
"author" : " Mark <mark@remarkablemark.org>" ,
6
6
"main" : " index.js" ,
7
7
"scripts" : {
8
- "build" : " webpack index.js dist/html-to-react.js" ,
9
- "build-min" : " webpack -p index.js dist/html-to-react.min.js" ,
8
+ "build" : " NODE_ENV=development webpack index.js dist/html-to-react.js" ,
9
+ "build-min" : " NODE_ENV=production webpack -p index.js dist/html-to-react.min.js" ,
10
10
"test" : " mocha" ,
11
11
"lint" : " eslint index.js \" lib/**\" \" test/**\" " ,
12
12
"cover" : " istanbul cover _mocha -- -R spec \" test/**/*\" " ,
Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
+ /**
4
+ * Module dependencies.
5
+ */
6
+ var webpack = require ( 'webpack' ) ;
7
+
3
8
/**
4
9
* Export webpack configuration.
5
10
*/
@@ -15,5 +20,11 @@ module.exports = {
15
20
commonjs : 'react' ,
16
21
amd : 'react'
17
22
}
18
- }
23
+ } ,
24
+ plugins : [
25
+ new webpack . optimize . OccurrenceOrderPlugin ( ) ,
26
+ new webpack . DefinePlugin ( {
27
+ 'process.env.NODE_ENV' : JSON . stringify ( process . env . NODE_ENV )
28
+ } )
29
+ ]
19
30
} ;
You can’t perform that action at this time.
0 commit comments