Commit 2dd1556
authored
feat(persist): add 'exports' field for proper ESM/CJS resolution (#4611)
* feat(persist): add 'exports' field for proper ESM/CJS resolution
What: add "exports" field to package.json, mapping ESM to ./dist/module.esm.js and CJS to ./dist/module.cjs.js
Why: tools like Vite default to main when exports is absent, causing CJS to be used in dev server and breaking default export detection.
How: update package.json, built & tested locally with Vite and Node (import/require).
Backward compatibility: keeps existing main & module fields.
* Format package.json1 parent 960ce5c commit 2dd1556
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
16 | 20 | | |
17 | 21 | | |
0 commit comments