has-dynamic-import
Does the current environment have `import()` support?
Last updated a year ago by ljharb .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install has-dynamic-import 
SYNC missed versions from official npm registry.

has-dynamic-import Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

Does the current environment have import() support?

At the time of this writing, node v12.17+, v13.2+ and v14.0+ has support for dynamic import(); the syntax is supported in node v10+.

The former can be checked in the packageā€˜s main export, which is an async function that returns a boolean indicating if the current environment fully supports dynamic import. Note that in node v12.17 - v12.19 and v13.4 - v13.13, an ExperimentalWarning will be logged.

The latter can be checked with 'has-dynamic-import/syntax', which is a function that returns a boolean indicating if the current environment supports parsing the syntax of dynamic import.

Tests

Simply clone the repo, npm install, and run npm test

Current Tags

  • 2.1.0                                ...           latest (a year ago)

6 Versions

  • 2.1.0                                ...           a year ago
  • 2.0.1                                ...           3 years ago
  • 2.0.0                                ...           4 years ago
  • 1.1.0                                ...           4 years ago
  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Total 5
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (15)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE