Skip to content

Commit 8e2d7f8

Browse files
amcclainclaude
andcommitted
Remove html-webpack-tags-plugin, inject preflight tag from template
The plugin was unmaintained since 2021 and pulled in deprecated glob@7/inflight transitive deps that surfaced as install warnings. It was used in a single spot to inject the preflight.js script tag; that tag now lives in static/index.html directly, with a preflightHash template parameter (compilation hash) preserving cache-busting. Also bumps terser-webpack-plugin 5.5 → 5.6 and adds a note to CLAUDE.md documenting that this repo uses yarn (classic) as its package manager. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 155a7ff commit 8e2d7f8

6 files changed

Lines changed: 289 additions & 321 deletions

File tree

CHANGELOG.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# Changelog
22

3+
## v13.0.0-SNAPSHOT
4+
5+
### ⚙️ Technical
6+
7+
* Removed `html-webpack-tags-plugin` dependency. It was used in a single spot to inject the
8+
`preflight.js` script tag and has been unmaintained since 2021, pulling in deprecated
9+
transitive deps (`glob@7`, `inflight`) that surfaced as warnings on install. The preflight
10+
tag is now emitted directly from the `static/index.html` template, with a `preflightHash`
11+
template parameter (sourced from the webpack compilation hash) preserving cache-busting.
12+
13+
### 📚 Libraries
14+
15+
* html-webpack-tags-plugin `3.0 → removed`
16+
* terser-webpack-plugin `5.5 → 5.6`
17+
318
## v12.1.0 - 2026-04-29
419

520
### 🎁 New Features
@@ -12,7 +27,7 @@
1227

1328
### 📚 Libraries
1429

15-
* terser-webpack-plugin `5.4 → 5.5`
30+
* terser-webpack-plugin `5.4 → 5.5`we u
1631

1732
## v12.0.1 - 2026-04-18
1833

CLAUDE.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ Key behaviors:
3737
There is no build step — the package ships `configureWebpack.js` and `static/**/*` directly.
3838
There are no tests in this repo.
3939

40+
**Package manager: yarn (classic, v1.x).** `yarn.lock` is the source of truth — do not invoke
41+
`npm install` or create a `package-lock.json`. If you need to inspect transitive-dep deprecation
42+
warnings (which yarn 1.x suppresses), use `yarn why <pkg>` or `npm ls <pkg>` in read-only fashion
43+
without reinstalling.
44+
4045
### Commands
4146

4247
```bash

configureWebpack.js

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ const _ = require('lodash'),
1515
CopyWebpackPlugin = require('copy-webpack-plugin'),
1616
MiniCssExtractPlugin = require('mini-css-extract-plugin'),
1717
HtmlWebpackPlugin = require('html-webpack-plugin'),
18-
HtmlWebpackTagsPlugin = require('html-webpack-tags-plugin'),
1918
TerserPlugin = require('terser-webpack-plugin'),
2019
WebpackBar = require('webpackbar'),
2120
parseChangelogMarkdown = require('changelog-parser'),
@@ -660,7 +659,10 @@ async function configureWebpack(env) {
660659
scriptTags,
661660
clientAppName,
662661
preloadBackgroundColor,
663-
preloadSpinnerColor
662+
preloadSpinnerColor,
663+
// Compilation hash used to cache-bust the (unbundled) preflight script
664+
// copied in from hoist-react via CopyWebpackPlugin.
665+
preflightHash: compilation.hash
664666
};
665667
},
666668
// No need to minify the HTML itself
@@ -687,14 +689,6 @@ async function configureWebpack(env) {
687689
});
688690
}),
689691

690-
// Insert a script tag for the (unbundled) preflight script, before all other scripts.
691-
new HtmlWebpackTagsPlugin({
692-
// Script available at this path via CopyWebpackPlugin above.
693-
scripts: ['public/preflight.js'],
694-
append: false,
695-
hash: true
696-
}),
697-
698692
// Support an optional post-build/run interactive treemap of output bundles and their sizes / contents.
699693
analyzeBundles
700694
? new BundleAnalyzerPlugin({

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
"css-loader": "~7.1.2",
3434
"file-loader": "~6.2.0",
3535
"html-webpack-plugin": "~5.6.0",
36-
"html-webpack-tags-plugin": "~3.0.2",
3736
"lodash": "4.x",
3837
"mini-css-extract-plugin": "~2.10.1",
3938
"postcss": "~8.5.3",
@@ -44,7 +43,7 @@
4443
"sass-loader": "~16.0.4",
4544
"sass-material-colors": "~0.0.5",
4645
"style-loader": "~4.0.0",
47-
"terser-webpack-plugin": "~5.5.0",
46+
"terser-webpack-plugin": "~5.6.0",
4847
"type-fest": "5.x",
4948
"url-loader": "~4.1.1",
5049
"webpack": "~5.106.2",

static/index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
</head>
2222
<body class="xh-app" style="margin: 0">
2323

24+
<script src="<%= webpackConfig.output.publicPath %>public/preflight.js?<%= preflightHash %>"></script>
25+
2426
<noscript>
2527
This application requires that JavaScript be enabled for this site in your browser.
2628
</noscript>

0 commit comments

Comments
 (0)