Created
July 25, 2022 14:36
-
-
Save tommie/f20e4c297cf86044681abd04df3d6ce5 to your computer and use it in GitHub Desktop.
Small repro case for https://github.com/guybedford/es-module-shims/issues/295
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 const A = 42; | |
import * as x from './a.esm.js'; | |
console.log('x.A is', x.A); // BAD: "x.A is undefined" |
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
<!DOCTYPE html> | |
<html> | |
<script async src="es-module-shims.js"></script> | |
<script type="importmap">{"imports": {"a": "./a.esm.js"}}</script> | |
<script type="module"> | |
import {A} from 'a'; | |
console.log('A is', A); // GOOD: A is 42 | |
</script> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment