Open tom2strobl opened 1 month ago
Hey, I'll look into this improvement this week, seems like a simple enough addition. Thanks!
Would also appreciate this 👍
I just published version 1.1.6
that maps import/require exports to their proper module similar to the way @tom2strobl shared from fuse.js. If you guys could try it out and let me know if that's what you were looking for, I'd appreciate it!
Thanks for the effort 💪
I got:
(node:27280) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
D:\code\languageforge-lexbox\frontend\node_modules\.pnpm\e2e-mailbox@1.1.6\node_modules\e2e-mailbox\dist\esm\index.js:1
import DeveloperMailService from './services/developerMailService';
^^^^^^
SyntaxError: Cannot use import statement outside a module
If I change the extension to .mjs
, I get:
Error: Cannot find module 'D:\code\languageforge-lexbox\frontend\node_modules\.pnpm\e2e-mailbox@file+..+..+e2e-mailbox\node_modules\e2e-mailbox\dist\esm\services\developerMailService' imported from D:\code\languageforge-lexbox\frontend\node_modules\.pnpm\e2e-mailbox@file+..+..+e2e-mailbox\node_modules\e2e-mailbox\dist\esm\index.mjs
I noticed that fuse.js is using webpack to pack everything into index.mjs. Presumably that would help. 🤷
Hi there!
could you add exports for esm style loading (
type: "module"
in package.json)fuse.js
does it like this in theirpackage.json
for example:Thanks!