js-yaml
js-yaml copied to clipboard
make esm treeshake friendly and add test
This PR
- makes js-yaml esm treeshake friendly
- new test added
- NOT update dist, to get it easier to review
- 2+3, leads to CI failure
This PR + updated dist
- can be found in branch https://github.com/loynoir/js-yaml/tree/feat-esm-treeshake-friendly-with-dist
- tests pass on node10, node12, node 14, node16, node17
- fixed https://github.com/nodeca/js-yaml/issues/631
@puzrin any opinion on this? it looks like this might help downstream projects cut down on bundle size via tree-shaking
Any updates?