Skip to content

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.

2 participants