DimiMikadze / create-react-library

React NPM library starter kit based on Facebook's create react app
MIT License
602 stars 60 forks source link

linking without rebuilding #11

Closed martunta closed 6 years ago

martunta commented 6 years ago

is it possible to somehow link npm module created by create-react-library, so I would not need to run yarn build every time I make any changes in library, so they would appear in the apps that include the module?

Bagera commented 6 years ago

I'm not sure I'm the one to comment here but... Every time you mabe any changes to your library you have to build to transpile the es2015+ to es5 and that is what is used by your other apps.

Possible fixes:

Bagera commented 6 years ago

To use the module without having to build every time just add "module": "src/lib/index.js", to your package.json Warning! This will break compatibility with Create-react-app as it does not support es2015+ in linked modules. This obviously only works if you are symlinking or similar, not for a library on npm.