Skip to content

Commit

Permalink
Docs: Added link to tutorial on code splitting (#2427)
Browse files Browse the repository at this point in the history
* Adding link to tutorial on code splitting

Link to tutorial on Code Splitting with React Router

* Update README.md
  • Loading branch information
jayair authored and gaearon committed Jun 26, 2017
1 parent 6e2898e commit 76bd132
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/react-scripts/template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,10 @@ This will make `moduleA.js` and all its unique dependencies as a separate chunk

You can also use it with `async` / `await` syntax if you prefer it.

### With React Router

If you are using React Router check out [this tutorial](http://serverless-stack.com/chapters/code-splitting-in-create-react-app.html) on how to use code splitting with it. You can find the companion GitHub repository [here](https://github.com/AnomalyInnovations/serverless-stack-demo-client/tree/code-splitting-in-create-react-app).

## Adding a Stylesheet

This project setup uses [Webpack](https://webpack.js.org/) for handling all assets. Webpack offers a custom way of “extending” the concept of `import` beyond JavaScript. To express that a JavaScript file depends on a CSS file, you need to **import the CSS from the JavaScript file**:
Expand Down

0 comments on commit 76bd132

Please sign in to comment.