Skip to content

Commit 46340fd

Browse files
CarreraPHPMRHarrison
authored andcommitted
fix(build): close tags in index.html (angular#3743)
Fixes angular#3217.
1 parent b0e32c1 commit 46340fd

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ export function getWebpackCommonConfig(
137137
template: path.resolve(appRoot, appConfig.index),
138138
filename: path.resolve(appConfig.outDir, appConfig.index),
139139
chunksSortMode: packageChunkSort(['inline', 'styles', 'scripts', 'vendor', 'main']),
140-
excludeChunks: lazyChunks
140+
excludeChunks: lazyChunks,
141+
xhtml: true
141142
}),
142143
new BaseHrefWebpackPlugin({
143144
baseHref: baseHref

tests/e2e/tests/build/scripts-array.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export default function () {
3939
.then(() => expectFileToMatch('dist/common-entry.bundle.css', '.common-entry-style'))
4040
// index.html lists the right bundles
4141
.then(() => expectFileToMatch('dist/index.html', oneLineTrim`
42-
<link href="common-entry.bundle.css" rel="stylesheet">
42+
<link href="common-entry.bundle.css" rel="stylesheet"/>
4343
`))
4444
.then(() => expectFileToMatch('dist/index.html', oneLineTrim`
4545
<script type="text/javascript" src="inline.bundle.js"></script>

tests/e2e/tests/build/styles/styles-array.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ export default function () {
4646
.then(() => expectToFail(() => expectFileToExist('dist/renamed-lazy-styles.bundle.js')))
4747
// index.html lists the right bundles
4848
.then(() => expectFileToMatch('dist/index.html', oneLineTrim`
49-
<link href="renamed-style.bundle.css" rel="stylesheet">
50-
<link href="styles.bundle.css" rel="stylesheet">
51-
<link href="common-entry.bundle.css" rel="stylesheet">
49+
<link href="renamed-style.bundle.css" rel="stylesheet"/>
50+
<link href="styles.bundle.css" rel="stylesheet"/>
51+
<link href="common-entry.bundle.css" rel="stylesheet"/>
5252
`))
5353
.then(() => expectFileToMatch('dist/index.html', oneLineTrim`
5454
<script type="text/javascript" src="inline.bundle.js"></script>

0 commit comments

Comments
 (0)