[DEPRECATED] see re-app-builder
Enables your react web project to be built with webpack out of the box with most common configuration.
Make sure you are using node@5 and npm@3 (use nvm to switch painlessly, this requirement will be dropped in future release), then cd into your clean project directory and run
npm init
npm i -S https://github.com/stackscz/webpack-configs
srcfolder holds all your project source files, app-builder looks forindex.jsas entry pointexamplesfolder holds all your project examples source files (optional)publicfolder contains static assets served by webpack-dev-server, namelyindex.htmlof your app (optional)libfolder is automatically created during build, it's content is also served by webpack-dev-server so there might be conflicts with filespublicfolder if you let that to happen
Additionally, apps folder can be created to host multiple experimental apps separately.
Those should have same structure as described above.
For example apps/myapp/src contains sources of myapp.
Here is index.html 7-liner
<!DOCTYPE html>
<html>
<head></head>
<body>
<script src="proxy.php?url=https%3A%2F%2Fgithub.com%2Findex.js"></script>
</body>
</html>
Add following script to your package.json
"ab": "node ./node_modules/@stackscz/webpack-configs/app-builder"
so you can run following commands
npm run ab dev [app_name] # starts dev server at 127.0.0.1:8080
npm run ab build:dev [app_name] # builds app in dev mode
npm run ab build:dev:watch [app_name] # builds app in dev mode and watches for changes
npm run ab build:prod [app_name] # builds app in production mode