se-cra-react-scripts
v4.0.5
Published
Configuration and scripts for Create React App.
Downloads
6
Readme
react-scripts
This fork includes the following changes:
New Webpack Configuration:
- Introduces a new webpack configuration with a different entry point:
src/widget.js
. - Aims to output a single JavaScript file.
- Outputs everything to
/widget
by default. - The new webpack configuration accepts the following environment variables:
WIDGET_PUBLIC_URL
(similar toPUBLIC_URL
): Defaults to"/widget/"
.WIDGET_BUILD_PATH
(similar toBUILD_PATH
): Defaults to"build/widget"
.
- Introduces a new webpack configuration with a different entry point:
Development Mode Enhancements:
- You can pass a new argument
--widget
to thestart
script in development mode. - When the
--widget
argument is passed,webpack-dev-server
uses the new webpack configuration. webpack-dev-server
accepts the following environment variable:WIDGET_PORT
(similar toPORT
): Defaults to3210
.
- You can pass a new argument
Proxying Requests in Development Mode:
- In development mode, all requests to
/widget/**/*
are proxied to the/widget/**/*
path of thewebpack-dev-server
instance running with the--widget
argument.
- In development mode, all requests to
Steps to publish to npm
Update package.json version
Run:
$ npm login $ npm publish
Troubleshooting
Uncaught ReferenceError: process is not defined
Latest versions of
react-error-overlay
have that bug. Add the following to yourpackage.json
to fix it:"resolutions": { "react-error-overlay": "6.0.8" },
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.