mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-10-16 09:17:52 +00:00
refactor: replace module-alias
dependency with internal alias resolver (#3893)
- removes the external unmaintained `module-alias` dependency -> reducing complexity and risk - introduces a small internal alias mechanism for `logger` and `node_helper` - preserves backward compatibility for existing 3rd‑party modules - should simplify a future ESM migration of MagicMirror I'm confident that it shouldn't cause any problems, but we could also consider including it in the release after next. What do you think? This PR is inspired by PR #2934 - so thanks to @thesebas! 🙇 😃
This commit is contained in:
committed by
GitHub
parent
b1a189b238
commit
787cc6bd1f
@@ -1,12 +1,15 @@
|
||||
// Ensure internal require aliases (e.g., "logger") resolve when this file is run as a standalone script
|
||||
require("./alias-resolver");
|
||||
|
||||
const path = require("node:path");
|
||||
const fs = require("node:fs");
|
||||
const { styleText } = require("node:util");
|
||||
const Ajv = require("ajv");
|
||||
const globals = require("globals");
|
||||
const { Linter } = require("eslint");
|
||||
const Log = require("logger");
|
||||
|
||||
const rootPath = path.resolve(`${__dirname}/../`);
|
||||
const Log = require(`${rootPath}/js/logger.js`);
|
||||
const Utils = require(`${rootPath}/js/utils.js`);
|
||||
|
||||
const linter = new Linter({ configType: "flat" });
|
||||
|
Reference in New Issue
Block a user