LearnNewsExamplesServices
Frontmatter
id7445
titleAdd `loadModule` RMA Method to App Worker
stateClosed
labels
enhancement
assigneestobiu
createdAtOct 10, 2025, 7:19 PM
updatedAtOct 10, 2025, 7:21 PM
githubUrlhttps://github.com/neomjs/neo/issues/7445
authortobiu
commentsCount0
parentIssue7435
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtOct 10, 2025, 7:21 PM

Add loadModule RMA Method to App Worker

Closed v11.0.0 enhancement
tobiu
tobiu commented on Oct 10, 2025, 7:19 PM

To support a fully dynamic component testing environment, we need a way for the Playwright test runner (main thread) to dynamically load ES modules into the App Worker on demand. The current approach used by the Siesta harness, which involves a static manifest file (test/components/app.mjs), is brittle and does not support proper test isolation.

This task is to implement a new Remote Method Access (RMA) method, loadModule(), in src/worker/App.mjs.

Acceptance Criteria

  1. Create a new async method loadModule(path) in src/worker/App.mjs.
  2. This method must use a dynamic import() statement to load the module specified by the path.
  3. Crucially, the import statement must include the /* webpackIgnore: true */ magic comment to prevent webpack from trying to bundle the dynamic path.
  4. The new loadModule method must be added to the remote.main array in the config of src/worker/App.mjs to make it accessible from the main thread.
tobiu assigned to @tobiu on Oct 10, 2025, 7:19 PM
tobiu added the enhancement label on Oct 10, 2025, 7:19 PM
tobiu added parent issue #7435 on Oct 10, 2025, 7:19 PM
tobiu referenced in commit 9e1eaa4 - "Add loadModule RMA Method to App Worker #7445" on Oct 10, 2025, 7:20 PM
tobiu closed this issue on Oct 10, 2025, 7:21 PM