Skip to content

Commit a611a40

Browse files
TheLarkInnfilipesilva
authored andcommitted
feat(build): use html-loader for html files
Close #2298
1 parent 7c03ea9 commit a611a40

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
"fs.realpath": "^1.0.0",
7272
"glob": "^7.0.3",
7373
"handlebars": "^4.0.5",
74+
"html-loader": "^0.4.4",
7475
"html-webpack-plugin": "^2.19.0",
7576
"istanbul-instrumenter-loader": "^0.2.0",
7677
"json-loader": "^0.5.4",

packages/angular-cli/models/webpack-build-common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export function getWebpackCommonConfig(
115115

116116
       { test: /\.json$/, loader: 'json-loader' },
117117
       { test: /\.(jpg|png|gif)$/, loader: 'url-loader?limit=10000' },
118-
       { test: /\.html$/, loader: 'raw-loader' },
118+
       { test: /\.html$/, loader: 'html-loader' },
119119

120120
{ test: /\.(otf|woff|ttf|svg)$/, loader: 'url?limit=10000' },
121121
{ test: /\.woff2$/, loader: 'url?limit=10000&mimetype=font/woff2' },

packages/angular-cli/models/webpack-build-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ const getWebpackTestConfig = function (projectRoot, environment, appConfig) {
6464
{ test: /\.less$/, loaders: ['raw-loader', 'postcss-loader', 'less-loader'] },
6565
{ test: /\.scss$|\.sass$/, loaders: ['raw-loader', 'postcss-loader', 'sass-loader'] },
6666
{ test: /\.(jpg|png)$/, loader: 'url-loader?limit=128000' },
67-
{ test: /\.html$/, loader: 'raw-loader', exclude: [path.resolve(appRoot, appConfig.index)] }
67+
{ test: /\.html$/, loader: 'html-loader', exclude: [path.resolve(appRoot, appConfig.index)] }
6868
],
6969
postLoaders: [
7070
{

0 commit comments

Comments
 (0)