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

v4.29.0 : Module parse failed: 'import' and 'export' may only appear at the top level #8660

Closed
huineng opened this issue Jan 21, 2019 · 2 comments

Comments

@huineng
Copy link

huineng commented Jan 21, 2019

Bug report

What is the current behavior?

Error in dynamic import

Module parse failed: 'import' and 'export' may only appear at the top level (45:8)
You may need an appropriate loader to handle this file type.

ngAfterViewInit() {
      import('./df.tinymce.files')
            .then(() => {

What is the expected behavior?
Until version 4.29.0 this was working as expected, it's only with this version that this error happens

Other relevant information:
webpack version: v4.29.0
Node.js version: v11.7.0
Operating System: mac
Additional tools: ts 3.2.2

@sokra
Copy link
Member

sokra commented Jan 21, 2019

Looks like related to #8598

It would be great if you reduce your issue to a small reproducible example. Best put this example into a github repository together with instructions how to get to the problem.

cc @kiliancs

@sokra
Copy link
Member

sokra commented Jan 21, 2019

Duplicate of #8656

@sokra sokra marked this as a duplicate of #8656 Jan 21, 2019
@sokra sokra closed this as completed Jan 21, 2019
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

No branches or pull requests

2 participants