From 0cd16e822095d03bb200a98522f5ab0c906b07fb Mon Sep 17 00:00:00 2001 From: John Coburn Date: Tue, 5 Mar 2024 08:42:32 -0600 Subject: [PATCH] STRWEB-108 Favicons not injected into html template. (#137) * remove usage of speed measurer webpack plugin * log changes (cherry picked from commit e5da6758aff2954d3d9573b9193a1cf0456b5b67) --- CHANGELOG.md | 4 ++++ package.json | 1 - webpack.config.cli.prod.js | 7 ++----- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0478cff..0ed9f7c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change history for stripes-webpack +## 5.0.3 IN PROGRESS + +* Resolve issue with favicon referencing by removing `speed-measurer-webpack-plugin` and its wrapping of other webpack plugins. Refs STRWEB-108. + ## [5.0.2](https://github.com/folio-org/stripes-webpack/tree/v5.0.2) (2024-01-12) [Full Changelog](https://github.com/folio-org/stripes-webpack/compare/v5.0.1...v5.0.2) diff --git a/package.json b/package.json index d15a490..01e51f0 100644 --- a/package.json +++ b/package.json @@ -69,7 +69,6 @@ "semver": "^7.1.3", "serialize-javascript": "^5.0.0", "source-map-loader": "^4.0.0", - "speed-measure-webpack-plugin": "^1.5.0", "stream-browserify": "^3.0.0", "style-loader": "^3.3.0", "tapable": "^1.0.0", diff --git a/webpack.config.cli.prod.js b/webpack.config.cli.prod.js index c33f553..ef1b3b3 100644 --- a/webpack.config.cli.prod.js +++ b/webpack.config.cli.prod.js @@ -4,7 +4,6 @@ const webpack = require('webpack'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const { EsbuildPlugin } = require('esbuild-loader'); -const SpeedMeasurePlugin = require('speed-measure-webpack-plugin'); const buildBaseConfig = require('./webpack.config.base'); const cli = require('./webpack.config.cli'); @@ -27,7 +26,6 @@ const buildConfig = (stripesConfig) => { const transpiledModules = getTranspiledModules(allModulePaths); const transpiledModulesRegex = new RegExp(transpiledModules.join('|')); - const smp = new SpeedMeasurePlugin(); prodConfig.plugins = prodConfig.plugins.concat([ new webpack.ProvidePlugin({ @@ -61,12 +59,11 @@ const buildConfig = (stripesConfig) => { prodConfig.module.rules.push(esbuildLoaderRule(allModulePaths)); - const webpackConfig = smp.wrap({ plugins: prodConfig.plugins }); - webpackConfig.plugins.push( + prodConfig.plugins.push( new MiniCssExtractPlugin({ filename: 'style.[contenthash].css' }) ); - return { ...prodConfig, ...webpackConfig }; + return prodConfig; }; module.exports = buildConfig;