Skip to content
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

Collect dependency data from import declarations #21

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Rich-Harris
Copy link
Member

See #15. This checks for import declarations as well as require statements, which paves the way for components to be authored using ES6 syntax.

It doesn't rewrite anything (unlike #20) because the loader might need to rewrite require statements as import declarations or vice versa – so at the moment it's not particularly useful. Not sure how best to handle it – could possible add imports and requires arrays, or something like that (with objects with start, end, content, source properties? type, name, etc?), or should that be the job of loaders? Maybe we add rcu.convertRequiresToImports and rcu.convertImportsToRequires or something. (This probably involves some hand-waving around ES6 module semantics.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant