Skip to content

Commit

Permalink
fix(deploy): file injector
Browse files Browse the repository at this point in the history
  • Loading branch information
wessberg committed Oct 23, 2020
1 parent 9c9970d commit 6694e09
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions file-content-injector.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ const fs = require("fs");
file: "node_modules/core-js/internals/whitespaces.js",
match: String.raw`module.exports = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';`,
replacement: String.raw`module.exports = String.fromCharCode("0x0009") + String.fromCharCode("0x000A") + String.fromCharCode("0x000B") + String.fromCharCode("0x000C") + String.fromCharCode("0x000D") + String.fromCharCode("0x0020") + String.fromCharCode("0x00A0") + String.fromCharCode("0x1680") + String.fromCharCode("0x2000") + String.fromCharCode("0x2001") + String.fromCharCode("0x2002") + String.fromCharCode("0x2003") + String.fromCharCode("0x2004") + String.fromCharCode("0x2005") + String.fromCharCode("0x2006") + String.fromCharCode("0x2007") + String.fromCharCode("0x2008") + String.fromCharCode("0x2009") + String.fromCharCode("0x200A") + String.fromCharCode("0x202F") + String.fromCharCode("0x205F") + String.fromCharCode("0x3000") + String.fromCharCode("0x2028") + String.fromCharCode("0x2029") + String.fromCharCode("0xFEFF");`
},
{
file: "node_modules/@wessberg/connection-observer/dist/index.js",
match: String.raw`if (new.target === undefined) {`,
replacement: String.raw`if ((this instanceof ConnectionObserver ? this.constructor : void 0) === undefined) {`
}
].forEach(replace);

Expand Down

0 comments on commit 6694e09

Please sign in to comment.