Fix minifying templates from dependencies (#18795)

This commit is contained in:
Steve Repsher 2023-11-29 04:35:53 -05:00 committed by GitHub
parent c1c186d279
commit 3a94deef69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -120,15 +120,21 @@ module.exports.babelOptions = ({ latestBuild, isProdBuild, isTestBuild }) => ({
"template-html-minifier",
{
modules: {
lit: [
"html",
{ name: "svg", encapsulation: "svg" },
{ name: "css", encapsulation: "style" },
],
...Object.fromEntries(
["lit", "lit-element", "lit-html"].map((m) => [
m,
[
"html",
{ name: "svg", encapsulation: "svg" },
{ name: "css", encapsulation: "style" },
],
])
),
"@polymer/polymer/lib/utils/html-tag.js": ["html"],
},
strictCSS: true,
htmlMinifier: module.exports.htmlMinifierOptions,
failOnError: true, // we can turn this off in case of false positives
failOnError: false, // we can turn this off in case of false positives
},
],
// Import helpers and regenerator from runtime package