Fails on dynamic import
See original GitHub issueHello,
When using this to analyze source code for a Vue project, it fails on coming across a Webpack dynamic import.
With tools like ESLint, this is solvable by using babel-eslint as a parser.
Even though I have my ESLint config with babel-eslint plugged into Plato, I still get an Unexpected token error.
This may be solvable by using the parser described by the ESLint options or potentially offering another way to provide one’s own parser. Either that, or I am configuring it wrong.
It looks like the work done in #5 may support this, rather than using typhonjs for parsing which fails to parse dynamic imports.
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
import() - fails when the code is packaged into an executable ...
Dynamic import - import() - fails when the code is packaged into an ... The exe should not crash when dynamically importing an...
Read more >Dynamic import - import() - fails when the code is packaged ...
I am working in a commonjs environment trying to dynamically import an es module. Consider the below ...
Read more >[SOLVED] Dynamic import fails when not serving from ...
After setting up an alternate domain for our app, everything looked fine until testing some pages that use dynamic import. I get the...
Read more >Confusing error message when using dynamic import with ...
If I run import("./foo.js") where foo.js does not exist I already get a good error: TypeError: error loading dynamically imported module.
Read more >How to Bypass ES Modules Errors in Next.js with Dynamic ...
The error in the image below shows that we can't use the CommonJS approach to import a module. serialize-1. This new standard and...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@seanohue ok I am still working on this. all I can say is that I can repro it. I get
SyntaxError: Unexpected token (18:21)when I hit the first ‘inline’ import statement@seanohue Just popping in to say that I’m going to be implementing a fix related to project dependencies. I’ll be removing Grunt as much as I can, updating globby and also updating the underplaying parser. This, among some other issues, will go away. I’ll post in here when that is done and also THANK YOU for opening this issue and discussing it over this time.