# import.js **Repository Path**: mirrors_WebReflection/import.js ## Basic Information - **Project Name**: import.js - **Description**: A dynamic import() polyfill - **Primary Language**: Unknown - **License**: ISC - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-19 - **Last Updated**: 2026-01-10 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # import.js [![donate](https://img.shields.io/badge/$-donate-ff69b4.svg?maxAge=2592000&style=flat)](https://github.com/WebReflection/donate) A dynamic [import()](https://tc39.github.io/proposal-dynamic-import/) polyfill. Don't miss the [related blog post](https://twitter.com/WebReflection/status/856137076852621312). ### Features - [x] compatible with **native ES2015** modules - [x] compatible with native `import ... from ...` - [x] compatible with common native `export ...` expressions - [x] compatible with **Babel transpiled** ES2015 modules - [x] compatible with **relative paths** - [x] compatible with **absolute paths** ### Usage ```html ``` * the `src` should point to `import.js` or its `min.js` version * the `data-main` should point to your module entry point * feel free to use or not `deferred` or `async` to delay execution * all modules will be loaded through `XHR` to avoid the need of a `fetch` polyfill * however, you can add any polyfill you need upfront Use `https://unpkg.com/import.js@latest` as source if you'd like to use a CDN service. [Live test](https://webreflection.github.io/import.js/) based on [this folder](https://github.com/WebReflection/import.js/tree/master/js). You can test [native ES2015 module export](https://webreflection.github.io/import.js/?native) too. It requires a compatible browser (today any modern WebKit would do).