-
Notifications
You must be signed in to change notification settings - Fork 39
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
More statically analyzable dynamic imports #275
Labels
enhancement
New feature or request
Comments
This was referenced Nov 15, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Right now
deno_graph
can include completely statically analyzable dynamic imports in the module graph. These are dynamic import calls that are passed a string literal (e.g.await import("./cli")
).I propose to extend this to include simple dynamic cases, like
await import(`./islands/${path}`)
. This would include all files under./islands/
in the module graph.This would only work in files where
import.meta.url
isfile:///
, because remote specifiers can not be listed.This is modeled after a similar feature in Vite: https://vitejs.dev/guide/features.html#dynamic-import.
Unlike Vite, we should support nested directories. We should bail on symlinks, and should bail when we the # of matched modules exceeds some predefined limit, like 1024.
The text was updated successfully, but these errors were encountered: