Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
There's a circular dependency between
ember-debug/util/ember
andember-debug/util/ember/loader
(a module that customizes how modules are required). It didn't prevent things from working until now, but the situation changed.As part of implementing Ember + Vite apps support for the inspector, we need to centralize where modules are required in the
ember_debug
script, so this central system can adjust things depending on the inspected app (what version is it, does it build with Broccoli or Vite?) When we try to implement this centralization, we see the side effects of the circular dependency.Description
This PR removes
ember-debug/util/ember/loader
and moves its behavior intoember-debug/util/ember
. This change allows us to get rid of the circular dependency that used to exist between these two modules. It also reinforces the role ofember-debug/util/ember
as "the file that manages how Ember modules are required".The other changes in these PRs are all adjustments to the above for all the supported Ember versions. What needs to be imported doesn't include
?.default
, and the places that used to import fromember-debug/util/ember/loader
now import fromember-debug/util/ember
directly.