wooorm / refractor

Lightweight, robust, elegant virtual syntax highlighting using Prism

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can I remove `"type": "module"` from package.json ?

zhxqc opened this issue · comments

to fix:
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module

Instead rename index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /Users/XXX/node_modules/refractor/package.json.