Webpack starter kit to provide ready-to-go webpack support for react. Useful for poc or simple projects. Includes:
- dev server
- simple build command
- hot module reloading
- sass + postcss support
- customizable options (build path + file names)
- Clone the repo
- Using a node version of
7.6.0+
, runnpm install
- Customize environment in
custom-config.js
if necessary - Run
npm run dev
and navigate tolocalhost:4800
(or whatever custom port you set) - Add your react components + scss inside
src/
You can develop and serve the bundle from your own server but still support hot module reloading.
- In your html file, including the bundle via:
<script type="text/javascript" src="http://localhost:4800/bundle.js"></script>
- Add
<div id="root"></div>
to your html
Any changes should be reflected accordingly.
Override webpack defaults to your own development environment. See the custom-config.js
file for list of customizable options.
Allows you to proxy api requests to different host.
Eg: setting proxyPort: 1234
will result in requests to
localhost:4800/some_endpoint
proxied to
localhost:1234/some_endpoint
Babel plugins that may be useful
babel-plugin-transform-object-rest-spread
babel-preset-stage-0
babel-preset-stage-1
After installing, add to .babelrc
.