-
Notifications
You must be signed in to change notification settings - Fork 7
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
Syntax bikeshed #10
Comments
I think that
|
How is the dynamic one not applicable to bundlers? |
Bundlers (and other tooling that requires static resolution) can’t support dynamic resolution fully anyway. So adding specific syntax for it doesn’t bring any further guarantees of portability than what already exists. They may support some limited form but they can do that whether it is on import.meta or not. Note that I’m not counting parameterized loading as fully dynamic. The kind that some bundlers support by (ab)using a subset of the dynamic syntax. We could possibly add a more first-class solution for that as discussed in #5. |
To be more specific, bundlers artificially enforce static restraints on lots of dynamic syntax in ways that are not guaranteed by the language. Just so they can extract a string specifier from an AST (or type graph in some rare places?). Worse, none of these tools handle the same dynamic syntaxes in the same ways. Webpack has some funky "convert inline expressions to regexes", Parcel supports things like It would be really nice to eliminate all of this, and |
Just opening this cause it came up at TC39
I guess there's some complexity with
asset x from y
@sebmarkbage?There's also the dynamic forms which may or may not be good enough:
The text was updated successfully, but these errors were encountered: