Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { createHash } from 'node:crypto';
import { extname } from 'node:path';
import { loadEsmModule } from '../load-esm';
import { htmlRewritingStream } from './html-rewriting-stream';
import { VALID_SELF_CLOSING_TAGS } from './valid-self-closing-tags';

export type LoadOutputFileFunctionType = (file: string) => Promise<string>;

Expand Down Expand Up @@ -49,24 +50,6 @@ export interface FileInfo {
extension: string;
}

/** A list of valid self closing HTML elements */
const VALID_SELF_CLOSING_TAGS = new Set([
'area',
'base',
'br',
'col',
'embed',
'hr',
'img',
'input',
'link',
'meta',
'param',
'source',
'track',
'wbr',
]);

/*
* Helper function used by the IndexHtmlWebpackPlugin.
* Can also be directly used by builder, e. g. in order to generate an index.html
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/

/** A list of valid self closing HTML elements */
export const VALID_SELF_CLOSING_TAGS = new Set([
'area',
'base',
'br',
'col',
'embed',
'hr',
'img',
'input',
'link',
'meta',
'param',
'source',
'track',
'wbr',
/** SVG tags */
'circle',
'ellipse',
'line',
'path',
'polygon',
'polyline',
'rect',
'text',
'tspan',
'linearGradient',
'radialGradient',
'stop',
'image',
'pattern',
'defs',
'g',
'marker',
'mask',
'style',
'symbol',
'use',
'view',
/** MathML tags */
'mspace',
'mphantom',
'mrow',
'mfrac',
'msqrt',
'mroot',
'mstyle',
'merror',
'mpadded',
'mtable',
]);