Created
June 23, 2020 13:58
-
-
Save matthewp/8ed6249c433473e3e138e417b009c0e8 to your computer and use it in GitHub Desktop.
Import strangeness
This file contains hidden or 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
let error1, error2; | |
try { | |
await import('/mod.js'); | |
} catch(err) { | |
error1 = err; | |
} | |
try { | |
await import('/mod.js'); | |
} catch(err) { | |
error2 = err; | |
} | |
error1 === error2; // true | |
try { | |
await import('/mod.json', { if: { type: 'json' }}); | |
} catch(err) { | |
error1 = err; | |
} | |
try { | |
await import('/mod.json', { if: { type: 'json' }}); | |
} catch(err) { | |
error2 = err; | |
} | |
error1 === error2; // false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment