Nancy's Preferred Machete

    @linsight/react-scripts
    TypeScript icon, indicating that this package has built-in type declarations

    3.4.4 • Public • Published

    @linsight/react-scripts

    Customised react-scripts to support mutiple entry points.

    Usage

    1. Update your package.json file to replace dependency react-scripts into:

      "dependencies": {
          "@linsight/react-scripts": "~3.4.3",
          ...
      }
      
      
    2. 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"
      
    3. 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.

    4. You can also nest an index.html a subdirectory instead. e.g. admin/index.html

    Note

    1. The default index entry point will be working as normal if no custom entry points are defined in the .env file.
    2. However, if custom entry points are defined in the .env file, ONLY custom entry points will be used. This means you need to add ENTRY_POINT_INDEX="index" to the .env file if you want to keep the default index entry point.

    This package includes scripts and configuration used by Create React App.
    Please refer to its documentation:

    Keywords

    none

    Install

    npm i @linsight/react-scripts

    DownloadsWeekly Downloads

    7

    Version

    3.4.4

    License

    MIT

    Unpacked Size

    127 kB

    Total Files

    26

    Last publish

    Collaborators

    • dlin-me