Skip to content

Commit 14e9664

Browse files
committed
fix DefinePlugin stringifyObj bug
1 parent d9ac043 commit 14e9664

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/DefinePlugin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ class DefinePlugin {
3535
}(definitions, ""));
3636

3737
function stringifyObj(obj) {
38-
return "{" + Object.keys(obj).map((key) => {
38+
return "({" + Object.keys(obj).map((key) => {
3939
let code = obj[key];
4040
return JSON.stringify(key) + ":" + toCode(code);
41-
}).join(",") + "}";
41+
}).join(",") + "})";
4242
}
4343

4444
function toCode(code) {

0 commit comments

Comments
 (0)