@linsight/react-scripts
v3.4.4
Published
Customised configuration and scripts for Create React App with support for multiple entry points.
Downloads
6
Readme
@linsight/react-scripts
Customised react-scripts to support mutiple entry points.
Usage
Update your
package.json
file to replace dependencyreact-scripts
into:"dependencies": { "@linsight/react-scripts": "~3.4.3", ... }
Create a
.env
to your project root if you don't have one. Add to the.env
file your entry points. Example:ENTRY_POINT_INDEX="index" ENTRY_POINT_ADMIN="admin"
If your new entry point needs a HTML file (HtmlWebpackPlugin), you can simply add a HTML file named after the entry point in the public directory. e.g.
admin.html
.You can also nest an
index.html
a subdirectory instead. e.g.admin/index.html
Note
- The default
index
entry point will be working as normal if no custom entry points are defined in the.env
file. - However, if custom entry points are defined in the
.env
file, ONLY custom entry points will be used. This means you need to addENTRY_POINT_INDEX="index"
to the.env
file if you want to keep the defaultindex
entry point.
This package includes scripts and configuration used by Create React App. Please refer to its documentation:
- Getting Started – How to create a new app.
- User Guide – How to develop apps bootstrapped with Create React App.