Configure Angular2 + Webpack in Maven build.
Build application using Angular2 with Typescript, Webpack as Module Bundler and Maven as build environment. We will also use Angular 2 with bootstrap.js and jquery.js library
What is Webpack
Let's start building application using Angular2 and Typescript.
We will use Bootstrap + Jquery with Angular2 and Typescript in our sample application.
Download application from github: Angular2WebPackMaven
How output will look like:
Angular2 Typescript files:
Application single page application html file which contain placeholder to display
Application entry point file, this is the place where we have imported all application
Also, which module to load in placeholder is also present in main.ts
3. app folder
It contains application typescript files (modules, component, services, routes, models etc)
4. resources folder
A package.json file contains meta data about our app.
It includes list of dependencies to install for development and production environment.
Webpack configuration file
Download code from link : Angular2WebPackMaven
Steps to run the application:
1. After downloading the application, run "mvn install" in home directory as shown below,
(It will take some time to download all development dependencies)
2. For running the application, go to browser and hit
You may also like to see
If you find any issue in post or face any error while implementing, Please comment.