File tree 3 files changed +28
-0
lines changed
3 files changed +28
-0
lines changed Original file line number Diff line number Diff line change 57
57
"rollup-plugin-babel" : " ^3.0.2" ,
58
58
"rollup-plugin-commonjs" : " ^8.1.0" ,
59
59
"rollup-plugin-node-resolve" : " ^3.0.0" ,
60
+ "rollup-plugin-replace" : " ^2.0.0" ,
60
61
"rollup-plugin-uglify" : " ^2.0.1" ,
61
62
"sinon" : " ^1.17.6" ,
62
63
"webpack" : " ^3.5.5" ,
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import nodeResolve from 'rollup-plugin-node-resolve';
2
2
import babel from 'rollup-plugin-babel' ;
3
3
import commonjs from 'rollup-plugin-commonjs' ;
4
4
import uglify from 'rollup-plugin-uglify' ;
5
+ import replace from 'rollup-plugin-replace' ;
5
6
6
7
const env = process . env . NODE_ENV ;
7
8
@@ -24,6 +25,8 @@ const config = {
24
25
] ,
25
26
} ;
26
27
28
+
29
+
27
30
if ( env === 'production' ) {
28
31
config . plugins . push (
29
32
uglify ( {
@@ -35,6 +38,12 @@ if (env === 'production') {
35
38
} ,
36
39
} )
37
40
) ;
41
+
42
+ config . plugins . push (
43
+ replace ( {
44
+ 'process.env.NODE_ENV' : JSON . stringify ( 'production' )
45
+ } )
46
+ )
38
47
}
39
48
40
49
export default config ;
Original file line number Diff line number Diff line change @@ -4825,6 +4825,12 @@ magic-string@^0.19.0:
4825
4825
dependencies :
4826
4826
vlq "^0.2.1"
4827
4827
4828
+ magic-string@^0.22.4 :
4829
+ version "0.22.5"
4830
+ resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.22.5.tgz#8e9cf5afddf44385c1da5bc2a6a0dbd10b03657e"
4831
+ dependencies :
4832
+ vlq "^0.2.2"
4833
+
4828
4834
make-dir@^1.0.0 :
4829
4835
version "1.0.0"
4830
4836
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.0.0.tgz#97a011751e91dd87cfadef58832ebb04936de978"
@@ -6559,6 +6565,14 @@ rollup-plugin-node-resolve@^3.0.0:
6559
6565
is-module "^1.0.0"
6560
6566
resolve "^1.1.6"
6561
6567
6568
+ rollup-plugin-replace@^2.0.0 :
6569
+ version "2.0.0"
6570
+ resolved "https://registry.yarnpkg.com/rollup-plugin-replace/-/rollup-plugin-replace-2.0.0.tgz#19074089c8ed57184b8cc64e967a03d095119277"
6571
+ dependencies :
6572
+ magic-string "^0.22.4"
6573
+ minimatch "^3.0.2"
6574
+ rollup-pluginutils "^2.0.1"
6575
+
6562
6576
rollup-plugin-uglify@^2.0.1 :
6563
6577
version "2.0.1"
6564
6578
resolved "https://registry.yarnpkg.com/rollup-plugin-uglify/-/rollup-plugin-uglify-2.0.1.tgz#67b37ad1efdafbd83af4c36b40c189ee4866c969"
@@ -7507,6 +7521,10 @@ vlq@^0.2.1:
7507
7521
version "0.2.2"
7508
7522
resolved "https://registry.yarnpkg.com/vlq/-/vlq-0.2.2.tgz#e316d5257b40b86bb43cb8d5fea5d7f54d6b0ca1"
7509
7523
7524
+ vlq@^0.2.2 :
7525
+ version "0.2.3"
7526
+ resolved "https://registry.yarnpkg.com/vlq/-/vlq-0.2.3.tgz#8f3e4328cf63b1540c0d67e1b2778386f8975b26"
7527
+
7510
7528
7511
7529
version "0.0.4"
7512
7530
resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73"
You can’t perform that action at this time.
0 commit comments