@xh/hoist-dev-utils 12.1.0 → 12.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,7 +15,6 @@ const _ = require('lodash'),
15
15
  CopyWebpackPlugin = require('copy-webpack-plugin'),
16
16
  MiniCssExtractPlugin = require('mini-css-extract-plugin'),
17
17
  HtmlWebpackPlugin = require('html-webpack-plugin'),
18
- HtmlWebpackTagsPlugin = require('html-webpack-tags-plugin'),
19
18
  TerserPlugin = require('terser-webpack-plugin'),
20
19
  WebpackBar = require('webpackbar'),
21
20
  parseChangelogMarkdown = require('changelog-parser'),
@@ -660,7 +659,10 @@ async function configureWebpack(env) {
660
659
  scriptTags,
661
660
  clientAppName,
662
661
  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
664
666
  };
665
667
  },
666
668
  // No need to minify the HTML itself
@@ -687,14 +689,6 @@ async function configureWebpack(env) {
687
689
  });
688
690
  }),
689
691
 
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
-
698
692
  // Support an optional post-build/run interactive treemap of output bundles and their sizes / contents.
699
693
  analyzeBundles
700
694
  ? new BundleAnalyzerPlugin({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xh/hoist-dev-utils",
3
- "version": "12.1.0",
3
+ "version": "12.1.1",
4
4
  "description": "Utilities for configuring builds of Hoist-React client applications.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -33,7 +33,6 @@
33
33
  "css-loader": "~7.1.2",
34
34
  "file-loader": "~6.2.0",
35
35
  "html-webpack-plugin": "~5.6.0",
36
- "html-webpack-tags-plugin": "~3.0.2",
37
36
  "lodash": "4.x",
38
37
  "mini-css-extract-plugin": "~2.10.1",
39
38
  "postcss": "~8.5.3",
@@ -44,7 +43,7 @@
44
43
  "sass-loader": "~16.0.4",
45
44
  "sass-material-colors": "~0.0.5",
46
45
  "style-loader": "~4.0.0",
47
- "terser-webpack-plugin": "~5.5.0",
46
+ "terser-webpack-plugin": "~5.6.0",
48
47
  "type-fest": "5.x",
49
48
  "url-loader": "~4.1.1",
50
49
  "webpack": "~5.106.2",
package/static/index.html CHANGED
@@ -21,6 +21,8 @@
21
21
  </head>
22
22
  <body class="xh-app" style="margin: 0">
23
23
 
24
+ <script src="<%= webpackConfig.output.publicPath %>public/preflight.js?<%= preflightHash %>"></script>
25
+
24
26
  <noscript>
25
27
  This application requires that JavaScript be enabled for this site in your browser.
26
28
  </noscript>