Skip to content

Commit 39b2ae1

Browse files
authored
Revert "fix(perf): change css link tag's initial rel attr to preload"
1 parent c53bef0 commit 39b2ae1

1 file changed

Lines changed: 0 additions & 27 deletions

File tree

packages/fxa-settings/config/webpack.config.js

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -688,33 +688,6 @@ module.exports = function (webpackEnv) {
688688
filename: 'static/css/[name].[contenthash:8].css',
689689
chunkFilename: 'static/css/[name].[contenthash:8].chunk.css',
690690
}),
691-
isEnvProduction &&
692-
new (class {
693-
apply(compiler) {
694-
compiler.hooks.compilation.tap(
695-
'LinkTagRewritePlugin',
696-
(compilation) => {
697-
HtmlWebpackPlugin.getHooks(compilation).alterAssetTagGroups.tap(
698-
'LinkTagRewritePlugin',
699-
(data) => {
700-
data.headTags.forEach((tag) => {
701-
if (
702-
tag.tagName === 'link' &&
703-
tag.attributes.rel === 'stylesheet'
704-
) {
705-
tag.attributes.rel = 'preload';
706-
tag.attributes.as = 'style';
707-
tag.attributes.onload =
708-
"this.onload=null; this.rel='stylesheet';";
709-
tag.attributes.crossorigin = 'anonymous';
710-
}
711-
});
712-
}
713-
);
714-
}
715-
);
716-
}
717-
})(),
718691
// Generate an asset manifest file with the following content:
719692
// - "files" key: Mapping of all asset filenames to their corresponding
720693
// output file so that tools can pick it up without having to parse

0 commit comments

Comments
 (0)