mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-04-24 05:05:53 +08:00
Make 'publishing components to npm' a sub-part of the deployment doc
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user