korzio / djv

Dynamic JSON Schema Validator - Supports draft-04/06
https://www.npmjs.com/package/djv
MIT License
289 stars 31 forks source link

Fix browser support by adding a browser entry in package.json #68

Closed laurentgoudet closed 6 years ago

laurentgoudet commented 6 years ago

Currently the library can't easily be used in browser environments as build tools such as webpack would pick the main lib/djv.js entry point, which contains ES2015 code. Since a built version is already generated (using babel-preset-env), adding a browser entry point to package.json would fix the issue, allowing webpack (when its target is set to web) to pick the transpiled one when needed.

@korzio/djv-draft-04 also needs to be updated as it currently has the same issue.

korzio commented 6 years ago

Thanks @laurentgoudet I will check and release asap