intuit / LD-React-Components

Semantic component helpers to support LaunchDarkly feature flags in your React app.
MIT License
24 stars 35 forks source link

feat(build): use webpack to compile #57

Closed Hreherch closed 5 years ago

Hreherch commented 5 years ago

What Changed

(Hopefully) fixes #53 Removed references to module.exports to use ES6 import/exports exclusively, should also consider adding the eslint rule import/no-common -- this and a combination of using webpack to compile the build instead of purely babel.

Why

The --copy-files portion of the babel transform (part of yarn build) seems to simply copy the typescript files instead of actually modifying them, removing this piece will show that the files will not even be copied over. Webpack does also provide minimized code which may be a benefit for downstream users yet may cause issues when determining errors.

To be honest, not completely sure if this is the most appropriate solution, and I would like to test it with a module that uses LD-React-Components instead of create-react-app.