-
Notifications
You must be signed in to change notification settings - Fork 254
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
Add dynamic import support #72
Comments
hi @liyuanqiu thanks for raising this. It's a long standing wish (see this item on the backlog) - for typescript (where it's a first class citizen already)- and this issue helps me look into it again. The reason dependency-cruiser doesn't support it directly yet, is because it uses acorn to parse javascript. That said, there's options I can look into to work around the issue. No guarantees, though...
B.t.w. if you're using typescript dependency-cruiser already supports it - you can put |
Thank you, I'll give a try to the options you mentioned. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Expected Behavior
Add dynamic import support. It is widely used in lazy loading and code splitting scenarios.
Current Behavior
Now all dependencies imported using
import()
won't be added to the graph.Possible Solution
Context
import() now is a proposal:
https://github.com/tc39/proposal-dynamic-import
Webpack lazy loading and code splitting:
https://webpack.js.org/guides/lazy-loading/
https://webpack.js.org/guides/code-splitting/
React code splitting
https://reactjs.org/docs/code-splitting.html
The text was updated successfully, but these errors were encountered: