Skip to content

Commit 2276ede

Browse files
authored
Update index.ts
1 parent 76efea3 commit 2276ede

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

src/index.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,6 @@ export default class Plugin
2323
return html.replace('<!-- inline_css_outlet -->', `<style>${style}</style>`);
2424
}
2525

26-
static removeLinkTag(html: string, cssFileName: string) {
27-
return html.replace(
28-
new RegExp(`<link[^>]+href=['"]${cssFileName}['"][^>]+(>|\/>|><\/link>)`),
29-
'',
30-
);
31-
}
32-
3326
private config: Config;
3427

3528
private css: File = {};
@@ -57,7 +50,6 @@ export default class Plugin
5750
const isCurrentFileNeedsToBeInlined = this.filter(fileName);
5851
if (isCurrentFileNeedsToBeInlined) {
5952
this.css[fileName] = assets[fileName].source();
60-
delete assets[fileName];
6153
}
6254
} else if (isHTML(fileName)) {
6355
this.html[fileName] = assets[fileName].source();
@@ -72,7 +64,6 @@ export default class Plugin
7264

7365
Object.keys(this.css).forEach((key) => {
7466
html = Plugin.addStyle(html, this.css[key]);
75-
html = Plugin.removeLinkTag(html, publicPath + key);
7667
});
7768

7869
assets[htmlFileName] = {

0 commit comments

Comments
 (0)