Skip to content

Webpack 3 configuration to compile and test Angular 4 App. AoT & JiT compilation with Lazy loading modules

Notifications You must be signed in to change notification settings

adrigardi90/AngularWebpackCompilation

Repository files navigation

Webpack3_configuration

AngularWebpackCompilation

Webpack 3 configuration to compile and test Angular 4 application with lazy loading modules

Quick start

# Clone the repo
git clone https://github.com/adrigardi90/AngularWebpackCompilation.git

# Change into the repo directory
cd AngularWebpackCompilation

# install
npm install

Development Mode

In Development mode we use JiT compilation. Css are included in the head tag. The ouput is in the /compiled folder

# build dev mode
npm run build-dev

Production Mode

In Production mode we use AoT compilation with Tree Shaking. Css are included in one separated file. The ouput is in the /compiled folder

# build production mode
npm run build-production

Serve

We can serve the compile application from /compiled with http-server

# serve compiled app
npm run serve

Run testing & coverage

We use Karma & Jasmine to testing. The coverage reporter is in the /coverage folder

# run test
npm run test

Start

We can serve src folder and develop with hot reloading using webpack-dev-server

# start application
npm run start

About

Webpack 3 configuration to compile and test Angular 4 App. AoT & JiT compilation with Lazy loading modules

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published