A Babel plugin (v0.1.2) that transforms EmberData Packages API import statements (e.g., `import { attr } from '@ember-data/model'`) back to the legacy `DS.*` syntax for backward compatibility with older EmberData versions. It uses the @ember-data/rfc395-data mapping and is intended for use within Ember CLI apps and addons during the transition to the new packages. The plugin supports both default and named imports and works with Node 6+.
npm install babel-plugin-ember-data-packages-polyfillVerified import paths — ran on the pinned version, not inferred.
Shows how to add the plugin to Babel config and an example of how imports are transformed.
Ensure @ember-data/rfc395-data is in your package.json dependencies.
Use static import syntax for EmberData members.
Migrate away from legacy DS syntax entirely when possible.
npm install --save-dev @ember-data/rfc395-data
Update @ember-data/rfc395-data to the latest version or add a custom mapping.