Minimilistic Angular2 Seed utilizing the awesome development and build speed of FuseBox with Angular Plugins from ng2-fused! JIT/AOT/HMR/Tree Shaking/Code Splitting/Lazy Route Loading.
- Uber fast build times thanks to FuseBox.
- Builds with Angular JIT compilation.
- Builds with Angular AOT compilation (for enhanced optimization).
- Utilizes FuseBox's Quantum plugin for minification, dead code elimination, and tree shaking.
- File watching to automatically rebuild when code is changed.
- Hot Module Reloading to have your changes automatically reload in the browser.
- Split vendor/app bundles.
- Lazy Loaded Routing in both JIT and AOT modes.
- Automatic Code Splitting based on folder naming convents for modules that should be lazy loaded.
- Pre/post css processing in JIT or AOT builds (usable with any ViewEncapsulation mode).
- Seed comes out of the box with PostCSS setup but can easily be swapped.
- Build flags available to easily modify the build behaviour from the command line.
- Download or clone this repository.
- From within the newly cloned folder:
npm install
- Run the development server to compile and open the application.
npm run start
- Browser should automatically open to http://localhost:8080.
- Observe lazy loaded route and module at http://localhost:8080/feature.
- Run a build...
or...
npm run build
npm run build:aot
- Run the tests...
npm run test
npm run start
npm run build
npm run start:aot
npm run build:aot
Running the --prod flag executes a production ready build that eliminates dead code, performs tree shaking, and minifies the bundle. You can use the release scripts as well.
npm run release:aot
npm run release:jit
To allow for multi step processing and mutations on the source. Mostly this was our workaround to get AOT builds to play nicely with other code transformations as well as css pre/post processing.