# @embroider/shared-internals

> Utilities shared among the other embroider packages

Latest version **3.2.0** (published 2026-09-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install @embroider/shared-internals
pnpm add @embroider/shared-internals
yarn add @embroider/shared-internals
bun add @embroider/shared-internals
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 3.2.0 |
| Published | 2026-09-04 |
| First published | 2021-03-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | 12.* \|\| 14.* \|\| >= 16 |
| Dependencies | 13 |
| Unpacked size | 173 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 354 |
| Author | Edward Faulkner |
| Maintainers | nullvoxpopuli, simonihmig, ef4, rwjblue, katiegengler, real_ate |

## Links

- npm: https://www.npmjs.com/package/@embroider/shared-internals
- 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/shared-internals

## Dependencies (13)

- [debug](https://npm.io/package/debug.md) ^4.3.2
- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [semver](https://npm.io/package/semver.md) ^7.3.5
- [fs-extra](https://npm.io/package/fs-extra.md) ^9.1.0
- [is-subdir](https://npm.io/package/is-subdir.md) ^1.2.0
- [minimatch](https://npm.io/package/minimatch.md) ^3.0.4
- [resolve.exports](https://npm.io/package/resolve.exports.md) ^2.0.2
- [js-string-escape](https://npm.io/package/js-string-escape.md) ^1.0.1
- [pkg-entry-points](https://npm.io/package/pkg-entry-points.md) ^1.1.1
- [babel-import-util](https://npm.io/package/babel-import-util.md) ^3.0.1
- [ember-rfc176-data](https://npm.io/package/ember-rfc176-data.md) ^0.3.17
- [typescript-memoize](https://npm.io/package/typescript-memoize.md) ^1.0.1
- [resolve-package-path](https://npm.io/package/resolve-package-path.md) ^4.0.1

## Recent versions

- 3.2.0 (latest) — 2026-09-04
- 2.9.2 (v2-x) — 2025-12-02
- 3.0.1-unstable.f6c658d (unstable) — 2025-06-17
- 3.0.0-alpha.5 (alpha) — 2025-03-14
- 3.1.1 — 2026-06-05
- 3.1.0 — 2026-05-26
- 3.0.2 — 2025-12-23
- 3.0.1 — 2025-09-25
- 2.9.1 — 2025-06-18
- 3.0.1-unstable.6801c11 — 2025-06-02
- 3.0.1-unstable.61fd755 — 2025-05-29
- 3.0.1-unstable.50875b2 — 2025-05-23
- 3.0.1-unstable.a35ce2b — 2025-05-22
- 3.0.1-unstable.3b49754 — 2025-05-21
- 3.0.1-unstable.57baf37 — 2025-05-20
- … 552 more at https://npm.io/package/@embroider/shared-internals/versions

## README

# Embroider: translating existing Ember code into spec-compliant modern JavaScript


[![GitHub Actions CI][github-actions-badge]][github-actions-ci-url]

[github-actions-badge]: https://github.com/embroider-build/embroider/workflows/CI/badge.svg
[github-actions-ci-url]: https://github.com/embroider-build/embroider/actions?query=workflow%3ACI

This repo implements the Embroider translation layer and resolver that is used to allow modern build tooling with Ember Apps.

You can read more about the motivation and key ideas in the [intro to the SPEC](docs/spec.md).

## Status / Should I Use It?

There is an accepted RFC that will [make the Embroider build system the default for all newly generated Ember apps](https://rfcs.emberjs.com/id/0977-v2-app-format) i.e. when you run `ember new my-app` it will generate an Ember app that is built with [Vite](https://vite.dev) with this Embroider resolver installed as a plugin.

If you don't want to wait until that RFC has been fully implemented you can try out the [ember-vite-codemod](https://github.com/mainmatter/ember-vite-codemod) which will guide you through updating your existing applications or you can try the current [draft blueprint for an Embroider based Ember ember app](https://github.com/embroider-build/app-blueprint) and follow the instructions on that README.

Embroider with Vite is considered production ready so you should try it out and let us know if you discover any issues with your Applications

## For Addon Authors

Addon authors should see [ADDON-AUTHOR-GUIDE.md](docs/addon-author-guide.md) for advice on how to get their existing addons ready for Embroider. 

The [v2 Addon Format RFC](https://github.com/emberjs/rfcs/pull/507) is the official spec for the packages that Embroider natively handles. Common patterns and best practices for authoring these have been collected in the [v2 addon FAQs](./docs/v2-faq.md). For creating a new v2 addon from scratch, we recommend using our [v2 addon blueprint](https://github.com/embroider-build/addon-blueprint). For porting existing v1 addons, we refer to the [v2 porting guide](./docs/porting-addons-to-v2.md).

## Options

You can pass options into Embroider by passing them into the `compatBuild` function like:

```js
// ember-cli-build.js
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
const { compatBuild } = require('@embroider/compat');

module.exports = async function (defaults) {
  const { buildOnce } = await import('@embroider/vite');
  let app = new EmberApp(defaults, {});

  return compatBuild(app, buildOnce, {
    staticInvokables: true, // this is the default so you don't need to set it
    splitAtRoutes: ['route.name'], // can also be a RegExp
  );
};
```

The options are documented in detail in [Core Options](https://github.com/embroider-build/embroider/blob/main/packages/core/src/options.ts) and [Compat Options](https://github.com/embroider-build/embroider/blob/main/packages/compat/src/options.ts)

## Environment variables

For optional features, Embroider supports the following environment variables:

- `EMBROIDER_WORKING_DIRECTORY`: by default Embroider writes internal build-time artifacts like rewritten packages to `node_modules/.embroider`. In the case of running multiple builds concurrently (e.g. building for production and test in parallel) this would cause conflicts when concurrent processes try to write into the same directory. For this case you can point each Embroider process to a different directory using this environment variable. It can be an absolute file path, or relative to the application root directory.

## Compatibility

### Ember version

Requires Ember 3.28.11 or greater

## Contributing

see [`CONTRIBUTING.md`](CONTRIBUTING.md)

## License

This project is licensed under the [MIT License](LICENSE).

## Acknowledgements

Thanks to [Cardstack](https://github.com/cardstack) for sponsoring Embroider's development.

Thanks to the [Embroider Initiative](https://mainmatter.com/embroider-initiative/) sponsors for contributing to Embroider's development: 

- [Intercom](https://www.intercom.com/)
- [Ticketsolve](https://www.ticketsolve.com/)
- [Crowdstrike](https://www.crowdstrike.com/)
- [Auditboard](https://auditboard.com/)
- [HashiCorp](https://www.hashicorp.com/)
- [OTA Insight](https://www.otainsight.com/)
- [XBE](https://www.x-b-e.com/)
- [Teamtailor](https://www.teamtailor.com/)

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