This is an automated email from the ASF dual-hosted git repository.

pvillard31 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/main by this push:
     new 74eab88bfd6 NIFI-16346 Replaced Hash with Version in Registry Web UI 
(#11687)
74eab88bfd6 is described below

commit 74eab88bfd6ee668a04122545c8df527c50bf957
Author: David Handermann <[email protected]>
AuthorDate: Thu Sep 17 08:31:20 2026 -0500

    NIFI-16346 Replaced Hash with Version in Registry Web UI (#11687)
---
 .../nifi-registry-core/nifi-registry-web-ui/pom.xml       |  3 +++
 .../nifi-registry-web-ui/src/main/webpack.common.js       |  5 ++---
 .../nifi-registry-web-ui/src/main/webpack.prod.js         | 15 ++++++++-------
 3 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/nifi-registry/nifi-registry-core/nifi-registry-web-ui/pom.xml 
b/nifi-registry/nifi-registry-core/nifi-registry-web-ui/pom.xml
index 36545951c31..fe0535fc6b4 100644
--- a/nifi-registry/nifi-registry-core/nifi-registry-web-ui/pom.xml
+++ b/nifi-registry/nifi-registry-core/nifi-registry-web-ui/pom.xml
@@ -263,6 +263,9 @@
                         <configuration>
                             <arguments>run ${npm.bundle.script}</arguments>
                             
<workingDirectory>${frontend.working.dir}</workingDirectory>
+                            <environmentVariables>
+                                
<PROJECT_VERSION>${project.version}</PROJECT_VERSION>
+                            </environmentVariables>
                         </configuration>
                     </execution>
                 </executions>
diff --git 
a/nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webpack.common.js
 
b/nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webpack.common.js
index 8c4c2d1cedb..25f02e38f51 100644
--- 
a/nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webpack.common.js
+++ 
b/nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webpack.common.js
@@ -38,10 +38,9 @@ module.exports = {
 
     // Output bundles
     output: {
-        // add the content hash for auto cache-busting
-        filename: '[name].[contenthash].js',
+        filename: '[name].js',
         path: path.resolve(__dirname, './'),
-        // Pin the hashing algorithm so bundle names do not depend on the 
Node/OpenSSL default
+        // Pin the hashing algorithm so hashed module ids do not depend on the 
Node/OpenSSL default
         hashFunction: 'sha256'
     },
 
diff --git 
a/nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webpack.prod.js
 
b/nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webpack.prod.js
index a30e29b7c33..74335a0f6e9 100644
--- 
a/nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webpack.prod.js
+++ 
b/nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webpack.prod.js
@@ -27,6 +27,8 @@ const path = require('path');
 const commonConfig = require('./webpack.common');
 const loaders = require('./webpack.loader');
 
+const version = process.env.PROJECT_VERSION || 'SNAPSHOT';
+
 module.exports = merge(commonConfig, {
     // Tells webpack to use its built-in optimizations accordingly
     mode: 'production',
@@ -42,8 +44,7 @@ module.exports = merge(commonConfig, {
     devtool: 'source-map',
 
     output: {
-        // add the content hash for auto cache-busting
-        filename: '[name].[contenthash].js'
+        filename: `[name].${version}.js`
     },
 
     module: {
@@ -54,8 +55,7 @@ module.exports = merge(commonConfig, {
     },
 
     optimization: {
-        // Deterministic module and chunk identifiers so repeated builds emit 
byte-identical
-        // bundles, keeping the [contenthash] in the output file names stable 
across builds
+        // Deterministic module and chunk identifiers so repeated builds emit 
byte-identical bundles
         moduleIds: 'hashed',
         chunkIds: 'named',
         minimizer: [
@@ -70,8 +70,8 @@ module.exports = merge(commonConfig, {
     plugins: [
         // Create CSS files separately
         new MiniCssExtractPlugin({
-            filename: '[name].[contenthash].css',
-            chunkFilename: '[name].[contenthash].css'
+            filename: `[name].${version}.css`,
+            chunkFilename: `[name].${version}.css`
         }),
 
         // Create HTML files to serve your webpack bundles
@@ -83,7 +83,8 @@ module.exports = merge(commonConfig, {
 
         // Gzip
         new CompressionPlugin({
-            test: /\.min\..+\.js$|\.min\..+\.css$/
+            test: /\.(js|css)$/,
+            exclude: /\.map$/
         })
     ]
 });

Reply via email to