Skip to content

Commit

Permalink
[CLEANUP canary] Remove final eager consumption of AMD loader
Browse files Browse the repository at this point in the history
This is the last place where Ember treats the AMD loader as mandatory. After this change I have Ember's whole test suite passing with no AMD loader!
  • Loading branch information
ef4 committed Jan 3, 2024
1 parent 5c19329 commit f016daf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/ember/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -506,8 +506,10 @@ namespace Ember {
get define() {
return (globalThis as any).define;
},
// @ts-expect-error These properties don't appear as being defined
registry: typeof requirejs !== 'undefined' ? requirejs.entries : require.entries,
get registry() {
let g = globalThis as any;
return g.requirejs?.entries ?? g.require.entries;
},
};

// ------------------------------------------------------------------------ //
Expand Down

0 comments on commit f016daf

Please sign in to comment.