# @embroider/addon-shim

> Make v2 addons work in non-Embroider apps.

Latest version **1.10.3** (published 2026-06-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install @embroider/addon-shim
pnpm add @embroider/addon-shim
yarn add @embroider/addon-shim
bun add @embroider/addon-shim
```

## Health

**Score 60/100 (C)** — status: active.

Positive: has types; no vulnerabilities; has provenance; high maintenance score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 1.10.3 |
| Published | 2026-06-05 |
| First published | 2021-04-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | 12.* \|\| 14.* \|\| >= 16 |
| Dependencies | 4 |
| Unpacked size | 31.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 354 |
| Maintainers | nullvoxpopuli, simonihmig, ef4, rwjblue, katiegengler, real_ate |

## Links

- npm: https://www.npmjs.com/package/@embroider/addon-shim
- Repository: https://github.com/embroider-build/embroider
- Homepage: https://github.com/embroider-build/embroider#readme
- Issues: https://github.com/embroider-build/embroider/issues
- npm.io page: https://npm.io/package/@embroider/addon-shim

## Dependencies (4)

- [semver](https://npm.io/package/semver.md) ^7.3.8
- [broccoli-funnel](https://npm.io/package/broccoli-funnel.md) ^3.0.8
- [common-ancestor-path](https://npm.io/package/common-ancestor-path.md) ^1.0.1
- [@embroider/shared-internals](https://npm.io/package/@embroider/shared-internals.md) ^3.1.1

## Recent versions

- 1.10.3 (latest) — 2026-06-05
- 1.10.1-unstable.f6c658d (unstable) — 2025-06-17
- 1.10.0-alpha.0 (alpha) — 2025-04-02
- 1.10.2 — 2025-11-11
- 1.10.1 — 2025-11-11
- 1.10.1-unstable.6801c11 — 2025-06-02
- 1.10.1-unstable.61fd755 — 2025-05-29
- 1.10.1-unstable.50875b2 — 2025-05-23
- 1.10.1-unstable.a35ce2b — 2025-05-22
- 1.10.1-unstable.3b49754 — 2025-05-21
- 1.10.1-unstable.57baf37 — 2025-05-20
- 1.10.1-unstable.79af026 — 2025-05-20
- 1.10.1-unstable.b0ce18c — 2025-05-20
- 1.10.1-unstable.406a827 — 2025-05-20
- 1.10.1-unstable.f9bcc6f — 2025-05-20
- … 532 more at https://npm.io/package/@embroider/addon-shim/versions

## README

# @embroider/addon-shim

Makes a v2 addon work like a v1 addon so it can be used in a classic (non-Embroider) app.

This allows addons to update to v2 without waiting for all their users to upgrade to Embroider.

## Compatibility

- Ember.js v3.13 or above
- Ember CLI v2.13 or above
- Node.js v10 or above

## Installation

```
ember install @embroider/addon-shim
```

## Usage

To use it:

1. Be prepared to do a semver major release of your addon, because the shim demands that the app has ember-auto-import >= 2.
2. Create an `addon-main.js` file that requires and invokes the shim:

   ```js
   const { addonV1Shim } = require('@embroider/addon-shim');
   module.exports = addonV1Shim(__dirname);
   ```

3. Update your `package.json` to point at addon-main.js:

   ```json
   {
     "ember-addon": {
       "version": 2,
       "type": "addon",
       "main": "addon-main.js"
     }
   }
   ```

### Shim Options

**disabled**: this optional argument lets you control whether your shimmed addon will emit `'app-js'` and `'public-assets'` into non-embroider builds. Example:

```js
module.exports = addonV1Shim(__dirname, {
  disabled(options) {
    let welcomeConfig = options['ember-welcome-page'] || {};
    return process.env.EMBER_ENV === 'production' && !welcomeConfig.enabled;
  },
});
```

This option _only_ works in non-embroider builds. Under embroider, apps just won't import the parts of your addon they don't want.

## Contributing

See the top-level CONTRIBUTING.md in this monorepo.

## License

This project is licensed under the MIT License.

---
_Source: https://npm.io/package/@embroider/addon-shim · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
