Skip to content

refactor(server): migrate server and vendor to ESM - #4321

Merged
khassel merged 1 commit into
MagicMirrorOrg:developfrom
KristjanESPERANTO:esm-server-vendor
Oct 28, 2026
Merged

khassel merged 1 commit into
MagicMirrorOrg:developfrom
KristjanESPERANTO:esm-server-vendor

Conversation

@KristjanESPERANTO

Copy link
Copy Markdown
Collaborator

Follow-up to #4316.

I've converted server.js and vendor.js to ESM. I did them together because the server is the only place on the Node side that uses vendor. The browser loader just imports the renamed file.

For the e2e tests I added a small global-setup.mjs wrapper, so ESM specs can import the helpers without touching the existing ones. vendor_spec.js is the first spec using it. The old specs work as before. Importing global-setup.js directly doesn't work, because then Vitest would run the app inside its own module loader.

@khassel
khassel merged commit 0e51d5f into MagicMirrorOrg:develop Oct 28, 2026
13 checks passed
@KristjanESPERANTO
KristjanESPERANTO deleted the esm-server-vendor branch October 28, 2026 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants