File tree Expand file tree Collapse file tree 2 files changed +38
-28
lines changed Expand file tree Collapse file tree 2 files changed +38
-28
lines changed Original file line number Diff line number Diff line change 45
45
"eslint-plugin-jsx-a11y" : " ^1.2.3" ,
46
46
"eslint-plugin-react" : " ^5.1.1" ,
47
47
"mocha" : " ^2.2.5" ,
48
+ "react" : " ^0.14.8" ,
48
49
"react-addons-test-utils" : " ^15.1.0" ,
49
50
"rimraf" : " ^2.5.2" ,
50
51
"sinon" : " ^1.17.4" ,
Original file line number Diff line number Diff line change 1
- 'use strict' ;
1
+ var webpack = require ( 'webpack' ) ;
2
2
3
- var webpack = require ( 'webpack' )
3
+ var reactExternal = {
4
+ root : 'React' ,
5
+ commonjs2 : 'react' ,
6
+ commonjs : 'react' ,
7
+ amd : 'react'
8
+ } ;
4
9
5
- var env = process . env . NODE_ENV
10
+ var env = process . env . NODE_ENV ;
6
11
var config = {
7
- module : {
8
- loaders : [
9
- { test : / \. j s $ / , loaders : [ 'babel-loader' ] , exclude : / n o d e _ m o d u l e s / }
12
+ externals : {
13
+ react : reactExternal
14
+ } ,
15
+ module : {
16
+ loaders : [
17
+ { test : / \. j s $ / , loaders : [ 'babel-loader' ] , exclude : / n o d e _ m o d u l e s / }
18
+ ]
19
+ } ,
20
+ output : {
21
+ library : 'ReactBash' ,
22
+ libraryTarget : 'umd'
23
+ } ,
24
+ plugins : [
25
+ new webpack . optimize . OccurrenceOrderPlugin ( ) ,
26
+ new webpack . DefinePlugin ( {
27
+ 'process.env.NODE_ENV' : JSON . stringify ( env )
28
+ } )
10
29
]
11
- } ,
12
- output : {
13
- library : 'ReactBash' ,
14
- libraryTarget : 'umd'
15
- } ,
16
- plugins : [
17
- new webpack . optimize . OccurrenceOrderPlugin ( ) ,
18
- new webpack . DefinePlugin ( {
19
- 'process.env.NODE_ENV' : JSON . stringify ( env )
20
- } )
21
- ]
22
30
} ;
23
31
24
32
if ( env === 'production' ) {
25
- config . plugins . push (
26
- new webpack . optimize . UglifyJsPlugin ( {
27
- compressor : {
28
- pure_getters : true ,
29
- unsafe : true ,
30
- unsafe_comps : true ,
31
- warnings : false
32
- }
33
- } )
34
- )
33
+ config . plugins . push (
34
+ new webpack . optimize . UglifyJsPlugin ( {
35
+ compressor : {
36
+ pure_getters : true ,
37
+ unsafe : true ,
38
+ unsafe_comps : true ,
39
+ screw_ie8 : true ,
40
+ warnings : false
41
+ }
42
+ } )
43
+ )
35
44
}
36
45
37
- module . exports = config
46
+ module . exports = config ;
You can’t perform that action at this time.
0 commit comments