Skip to content

Commit

Permalink
(pkg/types): export typings and CJS builds
Browse files Browse the repository at this point in the history
- typings now output for TS devs, who overlap a lot with MobX devs!

- ESM build now hidden behind `module`, while CJS dev and prod builds
  are under `main`
- CJS appears to still be necessary per #3, but not necessarily for
  browser support, for _test_ support it's also necessary
  - unless one is transpiling node_modules or using the `esm` package,
    Node's support for ESM is still behind a flag / not in LTS
    - also it may not support `module` field per docs? might need .mjs?
  • Loading branch information
agilgur5 committed Jul 10, 2019
1 parent a6f5fd5 commit 2ad73b0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"name": "mst-persist",
"version": "0.0.2",
"description": "Persist and hydrate MobX-state-tree stores",
"main": "dist/mst-persist.esm.js",
"main": "dist/index.js",
"module": "dist/mst-persist.esm.js",
"typings": "dist/index.d.ts",
"files": [
"dist/"
],
Expand Down

0 comments on commit 2ad73b0

Please sign in to comment.