Registry / web-framework / ember-cli-import-polyfill

ember-cli-import-polyfill

JSON →
library0.2.0jsnpmunverified

This package, `ember-cli-import-polyfill`, is an Ember CLI addon designed to backport a newer addon import API (specifically referencing Ember CLI pull request #5877) to earlier versions of Ember CLI. Ember CLI is a foundational command-line utility for managing Ember.js applications, providing a robust build pipeline, project structure conventions, and an extensible addon system. Released at version 0.2.0 and last published approximately eight years ago, this addon addressed compatibility issues during a transition period in Ember CLI's internal architecture. Its purpose was to enable addon authors to leverage newer JavaScript module APIs while maintaining backward compatibility with older host Ember CLI applications that did not natively support these module APIs. Due to its age and the natural evolution of Ember CLI, the functionality it polyfilled is now standard in modern Ember CLI versions, rendering this specific polyfill obsolete.

npm install ember-cli-import-polyfill
INSTALL
IMPORT
SIG · EMBER-CLI-IMPORT-P
E
ember-cli-import-polyfill
web-frameworkjavascriptv0.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Installs the Ember CLI addon into an existing Ember.js project via the `ember install` command, which handles package installation and blueprint generation.

npx ember install ember-cli-import-polyfill // Addons are typically installed and then automatically integrated by Ember CLI. // No direct JavaScript import statements are typically made by end-user application code for this type of addon. // The addon modifies the Ember CLI build pipeline or provides blueprints/components. // For more complex polyfills or build modifications, configuration might be added to ember-cli-build.js, e.g.: // const EmberApp = require('ember-cli/lib/broccoli/ember-app'); // module.exports = function(defaults) { // let app = new EmberApp(defaults, { // // Example of hypothetical configuration for a polyfill addon // 'ember-cli-import-polyfill': { // enabled: true, // // specific options related to its backporting logic // } // }); // return app.toTree(); // };
Debug
Known issues
deprecatedThis package is very old (last updated 8 years ago, v0.2.0) and targets a specific, outdated pull request (#5877) in Ember CLI. Its functionality is almost certainly integrated into current Ember CLI versions, making it unnecessary and potentially incompatible with modern Ember.js applications.
fix
For modern Ember.js applications (Ember CLI v3.x and above), simply do not install this package. The 'addon import API' it polyfilled is now standard.
affects: <=0.2.0
gotchaThe README explicitly states, 'This addon doesn't work when symlinked, because it needs implicit access to your ember-cli module.' This can cause issues in development environments where `npm link` or `yarn link` are used for local addon development.
fix
Avoid symlinking this addon. If developing locally, ensure it's installed directly from a registry or a local path without symlinks. This limitation highlights its deep integration with the Ember CLI build process.
affects: >=0.0.0
breakingUsing this polyfill in newer Ember CLI versions (e.g., 3.x+) could lead to unexpected build failures or runtime errors due to conflicts with native Ember CLI features or module resolution logic. It targets an architectural gap that no longer exists.
fix
Remove `ember-cli-import-polyfill` from `package.json` and `node_modules`. Ensure your Ember CLI project is updated to a modern version that natively supports contemporary module import mechanisms.
affects: >=0.3.0 (hypothetical, as this package is abandoned)
Errors
Common errors & fixes
Error: Cannot find module 'ember-cli-import-polyfill'
The package was not correctly installed, or a symlink is breaking its internal resolution within Ember CLI's build process, as noted in the README.
fix
Run `npm install ember-cli-import-polyfill` or `yarn add ember-cli-import-polyfill`. If still failing, check for symlink usage and reinstall without symlinks. Ensure `ember-cli` is also correctly installed.
Build failed. The Broccoli Plugin '...' failed with: ... (related to module resolution or addon processing)
Likely a conflict with a newer Ember CLI version's internal module handling, as this polyfill attempts to modify core import behavior for older versions.
fix
This addon is designed for older Ember CLI versions. If you are on a modern Ember CLI, remove `ember-cli-import-polyfill` from your project. If you *must* use an older Ember CLI, ensure its version aligns with the polyfill's expected environment.
Upgrade
Version history
0.2.0latest on npm
Audit
Dependencies
ember-clirequiredThis package is an Ember CLI addon and operates within the context of an Ember CLI project, modifying its build process. It implicitly depends on the host project's `ember-cli` version.
Agent activity
2 hits · last 30 days
node
2
Resources
ember-cli-import-polyfill — npm install ember-cli-import-polyfill · libregistry