Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
docs: Add build section to getting-started.md (#3672)
Browse files Browse the repository at this point in the history
  • Loading branch information
kfranqueiro authored Sep 28, 2018
1 parent dcebd98 commit cb1edd3
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 @@ -333,6 +333,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 cb1edd3

Please sign in to comment.