-
-
Save EvanHahn/d8a353ef88376072371a1b8a02876e7d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import foo from "./other_module.js"; | |
// Triggers the shim | |
require(); | |
/* Causes the bug: | |
import BAD from "./bad"; | |
*/ | |
console.log(foo()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default function foo() { | |
return 123; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"private": true, | |
"type": "module", | |
"scripts": { | |
"build": "rollup -c rollup.config.js" | |
}, | |
"devDependencies": { | |
"@rollup/plugin-esm-shim": "^0.1.6", | |
"rollup": "^4.14.3" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import esmShim from "@rollup/plugin-esm-shim"; | |
export default { | |
input: "bug.js", | |
output: { | |
file: "/dev/stdout", | |
format: "es", | |
}, | |
plugins: [esmShim()], | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment