We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ffc73a commit 126989bCopy full SHA for 126989b
src/core/v4.ts
@@ -32,7 +32,8 @@ export class PluginForHtmlWebpackPluginV4 extends BasePlugin {
32
private cssStyleMap: Map<HTMLWebpackPlugin, CSSStyle[]> = new Map()
33
34
private prepareCSSStyle(data: BeforeAssetTagGenerationData) {
35
- data.assets.css.forEach((cssLink, index) => {
+ const [...cssAssets] = data.assets.css
36
+ cssAssets.forEach(cssLink => {
37
if (this.isCurrentFileNeedsToBeInlined(cssLink)) {
38
const style = this.getCSSStyle({
39
cssLink,
@@ -45,9 +46,11 @@ export class PluginForHtmlWebpackPluginV4 extends BasePlugin {
45
46
} else {
47
this.cssStyleMap.set(data.plugin, [style])
48
}
-
49
+constcssLinkIndex=data.assets.css.indexOf(cssLink)
50
// prevent generate <link /> tag
- data.assets.css.splice(index, 1)
51
+ if (cssLinkIndex !== -1) {
52
+ data.assets.css.splice(cssLinkIndex, 1)
53
+ }
54
55
56
})
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments