Make 'publishing components to npm' a sub-part of the deployment doc

This commit is contained in:
Kristofer Selbekk
2018-10-09 06:57:35 +02:00
parent 89087144ac
commit e3f0f4ab45
3 changed files with 7 additions and 11 deletions

View File

@@ -456,3 +456,6 @@ When asked about the project path, make sure to specify the `build` folder, for
Note that in order to support routers that use HTML5 `pushState` API, you may want to rename the `index.html` in your build folder to `200.html` before deploying to Surge. This [ensures that every URL falls back to that file](https://surge.sh/help/adding-a-200-page-for-client-side-routing).
## Publishing Components To npm
Create React App doesn't provide any built-in functionality to publish a component to npm. If you're ready to extract a component from your project so other people can use it, we recommend moving it to a separate directory outside of your project and then using a tool like [nwb](https://github.com/insin/nwb#react-components-and-libraries) to prepare it for publishing.