mirror of
https://github.com/ether/etherpad-lite.git
synced 2026-07-25 11:03:53 +00:00
refactor(node/utils): finish CJS->ESM (Settings, Minify, ExportEtherpad, ImportEtherpad, ExportHtml, toolbar)
All 26 files in node/utils/ now ESM. Settings.ts CJS shim removed (dead code under "type": module); plugins doing require() get .default-wrapped namespace via Node interop, the createRequire bridge in pluginfw will preserve sync loading once that lands. toolbar.ts's module.exports.availableButtons self-reference replaced by a module-private toolbar const. ts-check: 526 -> 539 errors. The +13 is from default-imports landing on modules that still live in db/ as CJS; resolves once db/ is flipped.
This commit is contained in:
parent
5c3739f4df
commit
4e6d073213
6 changed files with 58 additions and 59 deletions
|
|
@ -24,13 +24,13 @@
|
|||
import {TransformResult} from "esbuild";
|
||||
import mime from 'mime-types';
|
||||
import log4js from 'log4js';
|
||||
import {compressCSS, compressJS} from './MinifyWorker'
|
||||
import {compressCSS, compressJS} from './MinifyWorker.js';
|
||||
|
||||
import settings from './Settings';
|
||||
import settings from './Settings.js';
|
||||
import {promises as fs} from 'fs';
|
||||
import path from 'node:path';
|
||||
const plugins = require('../../static/js/pluginfw/plugin_defs');
|
||||
import sanitizePathname from './sanitizePathname';
|
||||
import plugins from '../../static/js/pluginfw/plugin_defs.js';
|
||||
import sanitizePathname from './sanitizePathname.js';
|
||||
const logger = log4js.getLogger('Minify');
|
||||
|
||||
const ROOT_DIR = path.join(settings.root, 'src/static/');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue