We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
import('./foo.js').catch((e) => { // catch error here });
when bundled to commonjs:
// commonjs Promise.resolve(require('./foo.js')).catch((e) => { // catch error here // will never execute if ./foo.js doesn't exist })
Promise.resolve takes only a value, not an expression. I think rollup should either use:
Promise.resolve
rollup
Promise.resolve().then(() => require('./foo.js'))
or the Promise constructor:
new Promise((res) => res(require('./foo.js')))
The text was updated successfully, but these errors were encountered:
Good point. Yes, an import error would not be caught by Promise.resolve.
Sorry, something went wrong.
Fix at #2958
@lukastaegert awesome, thanks!!
Successfully merging a pull request may close this issue.
How Do We Reproduce?
when bundled to commonjs:
Promise.resolve
takes only a value, not an expression. I thinkrollup
should either use:or the Promise constructor:
The text was updated successfully, but these errors were encountered: