Skip to content

Commit

Permalink
fix: work around swc problem
Browse files Browse the repository at this point in the history
  • Loading branch information
wessberg committed Oct 26, 2020
1 parent 8c13e61 commit fd9280e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions file-content-injector.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
const fs = require("fs");

[
// TODO: Remove this when https://github.com/swc-project/swc/issues/1188 has been resolved
{
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");`
},
// TODO: Remove this when https://github.com/swc-project/swc/issues/1179 has been resolved
{
file: "node_modules/@wessberg/connection-observer/dist/index.js",
Expand Down

0 comments on commit fd9280e

Please sign in to comment.