-
-
Notifications
You must be signed in to change notification settings - Fork 518
Open
Description
If I create an esm project (es. I put "type": "module" in the package.json), then I do:
node index.js
with an index.js that is simply:
import flexsearch from "flexsearch";
const d = new flexsearch.Document({});this results in the error:
(node:10112) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
I think that the compiled esm file is not correctly recognised as an esm module, I think the solution would be to simply have the file flexsearch\dist\flexsearch.bundle.module.min.js have the .mjs extension (I tried and it works).
This should work without messing up with the other type of imports.
Metadata
Metadata
Assignees
Labels
No labels