File tree 8 files changed +36
-31
lines changed
8 files changed +36
-31
lines changed Original file line number Diff line number Diff line change
1
+ node_modules
2
+ typings
3
+ app /* .js
4
+ app /* .map
5
+ main. * js
6
+ main. * map
Original file line number Diff line number Diff line change
1
+ /**
2
+ * Main App component
3
+ */
4
+
1
5
import { Component } from '@angular/core' ;
2
6
3
7
@Component ( {
4
8
selector : 'my-app' ,
5
- template : '<h1>Hello </h1>'
9
+ template : '<h1>Welcome to Angular 2 With Webpack </h1>'
6
10
} )
7
11
8
12
Original file line number Diff line number Diff line change 1
1
< html >
2
2
3
3
< head >
4
- < title > My AngWP app </ title >
4
+ < title > Angular 2 Wepack </ title >
5
5
< meta name ="viewport " content ="width=device-width,initial-scale=1 ">
6
6
</ head >
7
7
8
8
< body >
9
+ <!--Content-->
9
10
< my-app > View is loading</ my-app >
10
11
12
+ <!--Polyfills -->
11
13
< script src ="node_modules/core-js/client/shim.min.js "> </ script >
12
14
< script src ="node_modules/zone.js/dist/zone.js "> </ script >
13
15
< script src ="node_modules/reflect-metadata/Reflect.js "> </ script >
16
+
17
+ <!--Dependencies-->
14
18
< script src ="dist/bundle.js "> </ script >
15
19
</ body >
16
20
17
- </ html >
18
-
19
- <!--<html>
20
-
21
- <head>
22
- <title>Angular 2 QuickStart</title>
23
- <meta charset="UTF-8">
24
- <meta name="viewport" content="width=device-width, initial-scale=1">
25
- <link rel="stylesheet" href="styles.css">
26
- <!-- 1. Load libraries -->
27
- <!-- Polyfill(s) for older browsers -->
28
- <!--<script src="node_modules/core-js/client/shim.min.js"></script>
29
- <script src="node_modules/zone.js/dist/zone.js"></script>
30
- <script src="node_modules/reflect-metadata/Reflect.js"></script>
31
- <script src="node_modules/systemjs/dist/system.src.js"></script>-->
32
- <!-- 2. Configure SystemJS -->
33
- <!--<script src="systemjs.config.js"></script>
34
- <script>
35
- System.import('app').catch(function(err){ console.error(err); });
36
- </script>
37
- </head>-->
38
- <!-- 3. Display the application -->
39
-
40
- <!--<body>
41
- <my-app>Loading...</my-app>
42
- </body>
43
-
44
- </html>-->
21
+ </ html >
Original file line number Diff line number Diff line change
1
+ /**
2
+ * This will bootstrap the Angular Project
3
+ */
4
+
1
5
import { bootstrap } from '@angular/platform-browser-dynamic' ;
2
6
import { AppComponent } from './app/app.component' ;
3
7
Original file line number Diff line number Diff line change 1
1
{
2
- "name" : " MyAppWP " ,
2
+ "name" : " angular-webpack-sample " ,
3
3
"version" : " 1.0.0" ,
4
+ "description" : " This is a simple example of how to use webpack in Angular 2" ,
5
+ "repository" : {
6
+ "git" :" https://github.com/manjunathshetty/angular2-wepack-sample.git"
7
+ },
8
+ "license" : " ISC" ,
4
9
"scripts" : {
5
10
"build" : " webpack" ,
6
11
"start" : " tsc && webpack-dev-server" ,
Original file line number Diff line number Diff line change 1
1
{
2
+ "comments" :" Typescript Compiler options" ,
2
3
"compilerOptions" : {
3
4
"target" : " es5" ,
4
5
"module" : " commonjs" ,
Original file line number Diff line number Diff line change 1
1
{
2
+ "comments" :" Typescript type definition files" ,
2
3
"globalDependencies" : {
3
4
"core-js" : " registry:dt/core-js#0.0.0+20160317120654" ,
4
5
"jasmine" : " registry:dt/jasmine#2.2.0+20160505161446" ,
Original file line number Diff line number Diff line change
1
+ /*Webpack configuration file*/
2
+ /**
3
+ * Entry files : main.ts - Entry to the app
4
+ * Output: dist/bundle.js - Output location
5
+ * Resolve: js,ts files - Telling wepack how to resolve files`
6
+ * Module: ts with ts-loader - Typescript loader
7
+ */
1
8
module . exports = {
2
9
entry : "./main.ts" ,
3
10
output : {
You can’t perform that action at this time.
0 commit comments