Skip to content

Commit

Permalink
Merge branch 'master' into chore/infra/update-default-package-es5
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Goo authored Sep 28, 2018
2 parents 44dde56 + cb1edd3 commit 7fcf8f1
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,27 @@ Now run `npm start` again and open http://localhost:8080. You should see a Mater

<img src="button_with_ripple.png" alt="Button with Ripple" width="90" height="36">

### Step 5: Build Assets for Production

Up to this point, we've used `webpack-dev-server` to preview our work with live updates. However, `webpack-dev-server` is not intended for production use. Instead, we should generate production-ready assets.

Add another script to `package.json`:

```json
"scripts": {
"build": "webpack -p",
"start": "webpack-dev-server"
}
```

Now run the following command:

```
npm run build
```

This will produce `bundle.js` and `bundle.css` in the project directory. These contain the compiled CSS and transpiled JS, which you can then copy into a directory served by any web server.

## Appendix: Configuring a Sass Importer for Nested node_modules

It is possible to end up with nested `node_modules` folders if you have dependencies on conflicting versions of
Expand Down

0 comments on commit 7fcf8f1

Please sign in to comment.