Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

esm v3.x doesn't throw SyntaxError anymore for non-existing exports #327

Closed
dnalborczyk opened this issue Mar 22, 2018 · 3 comments
Closed
Labels

Comments

@dnalborczyk
Copy link
Contributor

dnalborczyk commented Mar 22, 2018

repro:

// index.js
import { foo2 } from './bar'
// bar.js
export const foo = true
// with esm default options
node -r esm index.js

the std/esm v0.25.4 line still throws (tested with mode: "js")

@jdalton
Copy link
Member

jdalton commented Mar 22, 2018

Hi @dnalborczyk!

This is part of the cjs interop. I can experiment with disabling this though as I've been bit by not getting notified of missing exports too.

@jdalton jdalton added the bug label Mar 22, 2018
@dnalborczyk
Copy link
Contributor Author

I thought I tried to turn off cjs interop for the above to test in v3 as well if I'm not mistaken. I might have to check that again ...

that would be a REALLY nice to have if technically feasible, otherwise it unfortunately removes one of the advantages of using esmodules 😕

@jdalton
Copy link
Member

jdalton commented Mar 23, 2018

v3.0.8 is released 🎉

@dnalborczyk dnalborczyk changed the title esm v3.x doesn't throw SyntaxError anymore for non-exising exports esm v3.x doesn't throw SyntaxError anymore for non-existing exports Mar 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

2 participants