Closed ceopaludetto closed 4 months ago
@ceopaludetto Thanks for reporting the issue. And I'm glad to hear you were able to use Unforget in your project! I'm currently working on a partial re-write to make the compiler more robust. I'm looking fro early adapters to test it and report bugs / provide feedback. Are you interested in contributing by reporting issues?
I was trying to use
react-unforget
in a simplevite
application, so I did the following configuration:When I've started the dev server, I got the following error:
Error: [commonjs--resolver] Failed to resolve entry for package "@react-unforget/runtime". The package may have incorrect main/module/exports specified in its package.json.
So, after some investigation I've discovered that you published the package.json with the following entries:
But in the dist folder, the modules are swapped(
js -> cjs, mjs -> js
) and thetypes
section is afterrequire
orimport
, so I suggest the following changes:After this modification, everything works like a charm