Skip to content

Commit 400b8a3

Browse files
committed
Remove barrel file imports from internal code for better tree-shaking
Replace all internal barrel imports (from `@ember/-internals/glimmer`, `@ember/-internals/environment`, etc.) with direct imports from the specific source files that define what is needed. Also replace all `export *` patterns in `@ember` packages with explicit named exports. - Update ~40 source files to import from specific lib paths instead of barrel `index.ts` files - Replace `export *` with named exports in `@ember/-internals/environment`, `@ember/engine/parent`, `@ember/template-compiler/*`, `ember-template-compiler`, and `ember-testing` - Replace `import * as environment` with named `{ hasDOM }` import in `@ember/application/instance` - Add deep import path entries to `@ember/-internals/package.json` exports map - Add `@glimmer/opcode-compiler` dependency to `ember-template-compiler` Test files are intentionally left unchanged as they may use barrel imports. Revert manual changes, so we can test lint Lint rule Lint rule Update sub-path exports Lint rule Lint rule eslint lint:fix Lockfile Fix fix
1 parent 36ff033 commit 400b8a3

334 files changed

Lines changed: 1905 additions & 1040 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

eslint-rules/index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/* eslint-disable no-undef */
2+
3+
'use strict';
4+
5+
module.exports = {
6+
rules: {
7+
'no-barrel-imports': require('./no-barrel-imports'),
8+
},
9+
};

0 commit comments

Comments
 (0)