Skip to content

Commit 0e63e6b

Browse files
committed
- Added an index.html template to improve customization
- Added ejs-loader dependency
1 parent bd3ad61 commit 0e63e6b

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

config/webpack/webpack.dev.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ var config = {
3838
},
3939
plugins: [
4040
new HtmlWebpackPlugin({
41-
title: 'Typescript Webpack Starter'
41+
title: 'Typescript Webpack Starter',
42+
template: '!!ejs-loader!src/index.html'
4243
})
4344
]
4445
};

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"license": "ISC",
2323
"devDependencies": {
2424
"css-loader": "^0.23.1",
25+
"ejs-loader": "^0.3.0",
2526
"expose-loader": "^0.7.1",
2627
"html-loader": "^0.4.3",
2728
"html-webpack-plugin": "^2.22.0",

src/index.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!DOCTYPE html>
2+
<html lang="">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="x-ua-compatible" content="ie=edge">
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
8+
<title><%= htmlWebpackPlugin.options.title %></title>
9+
10+
<meta name="description" content="<%= htmlWebpackPlugin.options.title %>">
11+
12+
</head>
13+
14+
<body>
15+
<div> You have successfully started your Typescript application using Webpack</div>
16+
</body>
17+
</html>

0 commit comments

Comments
 (0)