mirror of
https://github.com/quartz-community/note-properties.git
synced 2026-07-22 02:50:26 +00:00
Bundled CJS dependencies (e.g. reading-time) use require() for Node builtins like 'stream' and 'util'. In ESM output, the esbuild-generated __require shim throws 'Dynamic require of X is not supported' because there is no global require in ESM context. Add platform: 'node' and a banner that injects createRequire from the 'module' builtin, providing a working require() function for the CJS compatibility layer.
5 lines
No EOL
140 B
JavaScript
5 lines
No EOL
140 B
JavaScript
import { createRequire } from 'module';
|
|
|
|
createRequire(import.meta.url);
|
|
//# sourceMappingURL=types.js.map
|
|
//# sourceMappingURL=types.js.map
|