This repository was archived by the owner on Oct 26, 2018. It is now read-only.
File tree 3 files changed +34
-1
lines changed
3 files changed +34
-1
lines changed Original file line number Diff line number Diff line change 1
1
lib
2
+ dist
2
3
node_modules
3
4
coverage
4
5
* .log
Original file line number Diff line number Diff line change 16
16
],
17
17
"license" : " MIT" ,
18
18
"scripts" : {
19
- "build" : " mkdir -p lib && babel ./src -d lib" ,
19
+ "build" : " npm run build:commonjs & npm run build:umd & npm run build:umd:min" ,
20
+ "build:commonjs" : " mkdir -p lib && babel ./src -d lib" ,
21
+ "build:umd" : " webpack dist/ReactRouterRedux.js" ,
22
+ "build:umd:min" : " NODE_ENV=production webpack dist/ReactRouterRedux.min.js" ,
20
23
"lint" : " eslint examples src test" ,
21
24
"test" : " npm run lint && npm run test:node && npm run test:browser" ,
22
25
"test:node" : " mocha --compilers js:babel-register --recursive ./test/*.spec.js" ,
Original file line number Diff line number Diff line change
1
+ var webpack = require ( 'webpack' )
2
+
3
+ var config = {
4
+ entry : './src/index' ,
5
+ module : {
6
+ loaders : [
7
+ { test : / \. j s $ / , loaders : [ 'babel' ] , exclude : / n o d e _ m o d u l e s / }
8
+ ]
9
+ } ,
10
+ output : {
11
+ library : 'ReactRouterRedux' ,
12
+ libraryTarget : 'umd'
13
+ } ,
14
+ plugins : [
15
+ new webpack . optimize . OccurenceOrderPlugin ( )
16
+ ]
17
+ }
18
+
19
+ if ( process . env . NODE_ENV === 'production' ) {
20
+ config . plugins . push (
21
+ new webpack . optimize . UglifyJsPlugin ( {
22
+ compressor : {
23
+ warnings : false
24
+ }
25
+ } )
26
+ )
27
+ }
28
+
29
+ module . exports = config
You can’t perform that action at this time.
0 commit comments