Skip to content

move build of ember-debug to rollup#2645

Merged
mansona merged 8 commits intoemberjs:mainfrom
mainmatter:ember-debug
Jun 11, 2025
Merged

move build of ember-debug to rollup#2645
mansona merged 8 commits intoemberjs:mainfrom
mainmatter:ember-debug

Conversation

@mansona
Copy link
Member

@mansona mansona commented May 29, 2025

Context

The ember-inspector codebase is structured by two main pieces: the UI app (what you see when you use the inspector extension), and the ember_debug folder (code that is built then bundled into an ember_debug.js script, then injected in the page at runtime to create the bridge between the Ember app you want to inspect and the inspector extension).

Description

As part of the ultimate goal of Ember+Vite apps support, this PR changes the way ember_debug folder is built.

  • Before, the build was included in ember-cli-build. In other words, the inspector UI and the ember_debug were one package sharing the same build pipeline.
  • Now, the ember_debug is a separate package that has its own build pipeline relying on Rollup. At this stage of the work, the ember-cli-build remains responsible for the ember_debug.js bundle (this will be reworked in a later PR).

Ultimately we will need the injected script to be type=module to be able to use the required top-level await() to support Vite, but for now we can keep it as AMD but move the build over to Rollup.

This change should not be breaking in any way so any regressions are unexpected 👍

@mansona mansona force-pushed the ember-debug branch 3 times, most recently from 15277e0 to 82daeb0 Compare June 5, 2025 13:50
@BlueCutOfficial
Copy link
Contributor

BlueCutOfficial commented Jun 6, 2025

@mansona A suggestion of description that you're free to modify 😇 🙏


Done ✅

@BlueCutOfficial
Copy link
Contributor

Following the rebase, we now have to fix an issue with these lines:

const emberDebug = requireModule('ember-debug/main')['default'];
const viewInspection = emberDebug.viewDebug.viewInspection;

@BlueCutOfficial BlueCutOfficial self-requested a review June 11, 2025 10:05
@mansona mansona merged commit e2b5112 into emberjs:main Jun 11, 2025
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants