miukimiu / react-kawaii

Cute SVG React Components
https://react-kawaii.vercel.app/
MIT License
2.91k stars 104 forks source link

Add babel-cli and ES6 build using Babel CLI #54

Closed ZhangYiJiang closed 5 years ago

ZhangYiJiang commented 5 years ago

Fixes #45

After investigating using Rollup, I realized we can just use Babel directly, since we don't actually need bundling for the ES6 build, and the library doesn't have any additional dependencies worth tree shaking. I've disabled transpilation to CJS in Babel since Webpack already does that, and output the result from Babel to lib/es subdirectory. I think tree shaking works now, although it's a little hard to confirm because I'm importing the library into a test project locally using a symlink instead of off npm.

Also bumped the version number up. If everything is fine I would appreciate publishing this new version to npm so I can use this in my project. Thanks!