There are lots of good ways to go about creating your Angular app with webpack. The angular-cli from the Angular team scaffolds a project in seconds. The popular angular2-webpack-starter from the AngularClass has all the bells and whistles you could possibly need.
We started our own Angular Webpack project to better understand the ins and outs of an Angular + Webpack application. The configuration is similar to those found in both projects mentioned above. Big thanks to both teams for providing some awesome projects we refrenced when recreating our own. We highly recommend anyone new to Angular or Webpack to do the same!
yarn or npm install
Most scripts are only eligible with use of yarn
since they can reference one another. This can easily be changed by exchanging yarn
for npm run
Command | Description |
---|---|
serve | starts a dev server and opens a browser to port 3000 |
buid:dev | cleans & creates a debug distribution in /dist |
build:prod | cleans & creates an optimized project with separate styles and minimized scripts in /dist |
build | defaults to build:dev |
test | runs jasmine unit test with karma task runner |