-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
/
webpack.config.js
38 lines (38 loc) · 925 Bytes
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
var DefinePlugin = require("../../../../lib/DefinePlugin");
const Module = require("../../../../lib/Module");
module.exports = {
plugins: [
new DefinePlugin({
TRUE: true,
FALSE: false,
UNDEFINED: undefined,
FUNCTION: /* istanbul ignore next */ function(a) {
return a + 1;
},
CODE: "(1+2)",
REGEXP: /abc/i,
OBJECT: {
SUB: {
UNDEFINED: undefined,
FUNCTION: /* istanbul ignore next */ function(a) {
return a + 1;
},
CODE: "(1+2)",
REGEXP: /abc/i,
STRING: JSON.stringify("string")
}
},
"process.env.DEFINED_NESTED_KEY": 5,
"process.env.DEFINED_NESTED_KEY_STRING": '"string"',
"typeof wurst": "typeof suppe",
"typeof suppe": "typeof wurst",
wurst: "suppe",
suppe: "wurst",
RUNTIMEVALUE_CALLBACK_ARGUMENT_IS_A_MODULE: DefinePlugin.runtimeValue(
function({ module }) {
return module instanceof Module;
}
)
})
]
};