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

andytaylor pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis-console.git


The following commit(s) were added to refs/heads/main by this push:
     new 1bcb214  ARTEMIS-5647 - Fix branding in webpack dev server
1bcb214 is described below

commit 1bcb214c53f540248157ce1df702c132d38e451b
Author: GChuf <[email protected]>
AuthorDate: Fri Sep 12 11:30:59 2025 +0200

    ARTEMIS-5647 - Fix branding in webpack dev server
---
 .../artemis-extension/app/webpack.config.cjs                  | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/artemis-console-extension/artemis-extension/app/webpack.config.cjs 
b/artemis-console-extension/artemis-extension/app/webpack.config.cjs
index 37881ad..2dc367b 100644
--- a/artemis-console-extension/artemis-extension/app/webpack.config.cjs
+++ b/artemis-console-extension/artemis-extension/app/webpack.config.cjs
@@ -19,6 +19,7 @@ const HtmlWebpackPlugin = require('html-webpack-plugin')
 const { hawtioBackend } = require('@hawtio/backend-middleware')
 const { dependencies } = require('./package.json')
 const path = require("path")
+const fs = require("fs")
 const MiniCssExtractPlugin = require("mini-css-extract-plugin")
 const TerserPlugin = require("terser-webpack-plugin")
 const CssMinimizerPlugin = require("css-minimizer-webpack-plugin")
@@ -344,7 +345,9 @@ module.exports = (webpackEnv, args) => {
           const username = 'developer'
           const proxyEnabled = true
           const plugin = []
-          const hawtconfig = {}
+          const hawtconfig = JSON.parse(
+            fs.readFileSync(path.resolve(__dirname, 'public/hawtconfig.json'), 
'utf-8')
+          )
 
           // Hawtio backend API mock
           let login = true
@@ -366,8 +369,10 @@ module.exports = (webpackEnv, args) => {
           devServer.app.get('/console/proxy/enabled', (_, res) => 
res.send(String(proxyEnabled)))
           devServer.app.get('/console/plugin', (_, res) => 
res.send(JSON.stringify(plugin)))
 
-          // hawtconfig.json mock
-          devServer.app.get('/console/hawtconfig.json', (_, res) => 
res.send(JSON.stringify(hawtconfig)))
+          devServer.app.get('/console/hawtconfig.json', (_, res) => {
+            res.type('application/json');
+            res.send(JSON.stringify(hawtconfig));
+          })
 
           middlewares.push({
             name: 'hawtio-backend',


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to