-
-
Notifications
You must be signed in to change notification settings - Fork 26.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing export should be a compile error #1559
Comments
Seems like we need to set |
Rad. Anybody wants to make a PR? |
The config schema documentation for this says "Handles exceptions in module loading correctly at a performance cost" - should this be switched on in production builds? |
Perhaps we can test it on a relatively large application? Would anyone be willing to do this? |
It looks like this config triggers generation of |
+1, doesn't work for me. I've added |
|
Is there a reason why? I’m just curious what the rationale is. |
Some typescript constructs emit incorrect import/exports (related to the loader impl, not sure if it's fixed now). So we used a warning. But I guess it fine to add an option upgrading it to an error. |
See issue webpack/webpack#4347 and PR webpack/webpack#4348. |
Once webpack/webpack#4348 is merged we will be able to set Is it worth setting /cc @gaearon |
I'd rather avoid a |
|
Released in WP 2.3.0. |
This is only relevant in master which uses Webpack 2.
If I change
src/index.js
fromto
I'm getting:
The screen is blank (because of the runtime error).
Notice how the real problem is at the very bottom (missing export), yet it looks like the first two are the important ones.
The terminal output is also very restrained (because it is a warning):
I wonder what are the reasons for this. I think a missing ES6 export should totally be a compile error because it is so easy to mess it up, and then have weird runtime errors as a result.
I have two questions:
The text was updated successfully, but these errors were encountered: