webpackinjects and manipulates a static HTML file.
/<repo>/standard for asset serving.
react-scriptsthat only runs the webpack dev server against a static HTML file. It would be more difficult to maintain and would differ from a production server's environment, making it susceptible to bugs.
watchscript is not available in
create-react-app—which only has a
|SASS||Implemented||Sass configuration for react scripts|
|cssnext||Implemented||CSS equivalent of babel|
|Code Splitting – bootstrap / main||Implemented||Code split bundle into bootstrap.js (in <head>) and main.js (in <body>)|
|CSS Modules||Implemented||Stage 1: only implemented for CSS files ending in .module.css|
|SVG||Implemented||import SVGs as React components|
|Flow Type||Implemented||Implemented in babel-preset-react by default|
|TypeScript||Implemented||Interoperability will be a developer problem to solve|
|Server Side Rendering||Evaluating||Needs to be scoped|
|Absolute Paths||Will Not Implement||
@dollarshaveclub/react-scripts is a set of commands to run react apps following the create react app methodology.
It requires that apps adhere to certain rules—copy the
server/ folders when creating a new app.
The following file types can be imported from JS/TS file types:
.json- JS and JSON files are supported
.module.css- CSS modules are suffixed with
.css- global CSS files are suffixed as
.module.scss- SCSS modules are suffixed with
.scss- global SCSS files are suffixed with
.svg- SVG files imported in JS will be imported as a React component
Avoid the following:
localhost:<port>and a webpack dev server on
localhost:<port + 1>.
/<package.name>/. For example,
face-webassets are served from
In development, start your app locally by running
npm start, which should alias
There should be a
localhost link after the command is run in a shell.
To develop an app in a minibox or devbox, run
npm run watch within a shell. Then, refresh the app in a browser.
To build an app for production, run
npm run build within a shell.
To publish a new version of
To publish a version for testing, also called a beta version:
"version": "<version>-<betaVersion>" /* For example: "version": "1.0.0-beta.1", - The word 'beta' is not required. It is preferred. */
npm publish --tag beta
For more information on publishing, check out npm's publish spec.