Skip to content

refactor: migrate app entry to ESM - #4314

Merged
khassel merged 1 commit into
MagicMirrorOrg:developfrom
KristjanESPERANTO:app-esm
Oct 24, 2026
Merged

khassel merged 1 commit into
MagicMirrorOrg:developfrom
KristjanESPERANTO:app-esm

Conversation

@KristjanESPERANTO

Copy link
Copy Markdown
Collaborator

Follow-up to #4308.

I've converted app.js to app.mjs. So the core app now runs as ESM, which is an important step in the migration. Electron and the server-only entry still use CommonJS and load the app with import(). I would tackle them in one of the next steps.

I also updated the logger to recognize .mjs and .cjs files.

@khassel
khassel merged commit 694fb2c into MagicMirrorOrg:develop Oct 24, 2026
13 checks passed
@KristjanESPERANTO
KristjanESPERANTO deleted the app-esm branch October 24, 2026 10:41
khassel pushed a commit that referenced this pull request Oct 25, 2026
Follow-up to #4314.

I've converted `ip_access_control` to ESM. It's a small, self-contained
file that is only used by the server, so it's a good next candidate.

I added the new file to the same ESLint rules as `app.mjs` for now.
Otherwise the stricter default rules for `.mjs` files would force a lot
of style changes, and the diff would become much bigger than the actual
change. Once the ESM migration is done, it would make sense to revisit
the ESLint rules for all of these files together.
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