File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ const config: RollupOptions = {
16
16
include : 'config.js' ,
17
17
exclude : 'node_modules/**' ,
18
18
delimiters : [ '<@' , '@>' ] ,
19
+ objectGuards : true ,
19
20
preventAssignment : true ,
20
21
VERSION : '1.0.0' ,
21
22
ENVIRONMENT : JSON . stringify ( 'development' ) ,
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ export interface RollupReplaceOptions {
12
12
| Replacement
13
13
| RollupReplaceOptions [ 'include' ]
14
14
| RollupReplaceOptions [ 'values' ]
15
+ | RollupReplaceOptions [ 'objectGuards' ]
15
16
| RollupReplaceOptions [ 'preventAssignment' ] ;
16
17
17
18
/**
@@ -33,6 +34,12 @@ export interface RollupReplaceOptions {
33
34
* of `foo`, supply delimiters
34
35
*/
35
36
delimiters ?: [ string , string ] ;
37
+ /**
38
+ * When replacing dot-separated object properties like `process.env.NODE_ENV`,
39
+ * will also replace `typeof process` object guard checks against the objects
40
+ * with the string `"object"`.
41
+ */
42
+ objectGuards ?: boolean ;
36
43
/**
37
44
* Prevents replacing strings where they are followed by a single equals
38
45
* sign.
You can’t perform that action at this time.
0 commit comments