Considerations for import absolute-first when using ES2020 Dynamic imports?
See original GitHub issueI would assume the use case for dynamic imports.
IE:
import("foo").then( foo => {} )
Would be more likely used throughout the body of the document as opposed to being constrained to the head of the document considering the nature of code splitting.
Would it be possible to ignore import first in cases where import is followed by then?
Going off of: https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/first.md
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
ECMAScript - Introducing Dynamic Imports in ES2020 (ES11)
Introducing the "Dynamic Import" proposal, arriving with new import() keyword enabling to load a module on demand at runtime, which has been ...
Read more >ES2020: `import()` – dynamically importing ES modules - 2ality
The operator is used like a function: The parameter is a string with a module specifier that has the same format as the...
Read more >How to use Dynamic Imports in ES2020 - DEV Community
This means that rather than importing all your potentially necessary files at the top of your file, you can just import files based...
Read more >JavaScript modules: dynamic import() - CanIUse
Loading JavaScript modules dynamically using the import() syntax. Usage % of. all users, all tracked, tracked desktop, tracked mobile.
Read more >Exploring ES2020 features - Dynamic Import - Kamal Sharif
The module specifier can be specified by using the template literal too. This increases the flavor of dynamic importing. For example, we can...
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
Thanks for the help, that looks to have addressed my concerns.
Yes. You’ll need an ecmaVersion of 2020 in parserOptions, or to use babel-eslint as your parser.