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

Support dynamic import() syntax #79

Closed
wants to merge 2 commits into from

Conversation

keann
Copy link

@keann keann commented Apr 20, 2018

While acorn itself won't support import() spec until it hasn't reached stage 4, in some cases it's rather painful not to be able to use this syntax in the same file with bem imports. Fortunately, falafel supports custom parser and we could manually use acorn with extended syntax support.

@coveralls
Copy link

coveralls commented Apr 20, 2018

Coverage Status

Coverage increased (+0.2%) to 93.082% when pulling ea42036 on keann:dynamic-import-support into d509488 on bem:master.

test('dynamic import()', async () => {
const mock = {
'index.js' : `const test = import('./module.js')`,
'module.js' : 'export null'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

export default null? what means export null?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, though there's no meaning in the content of module.js, of course you're right, export default null *facepalm*
fixed.

@nikita-ezhkov
Copy link
Contributor

nikita-ezhkov commented May 13, 2019

Awaiting for the merge as well

@keann keann closed this Jun 19, 2023
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.

None yet

4 participants