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
commit e557293e591b936e8d40cd2343ad54d293d224ac Author: GChuf <[email protected]> AuthorDate: Fri Sep 5 11:20:20 2025 +0200 ARTEMIS-5630 - Fix webpack hot reload --- .../artemis-extension/app/src/index.ts | 2 +- .../artemis-extension/app/webpack.config.cjs | 21 +++++++++++++-------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/artemis-console-extension/artemis-extension/app/src/index.ts b/artemis-console-extension/artemis-extension/app/src/index.ts index d5a5a95..2446a5d 100644 --- a/artemis-console-extension/artemis-extension/app/src/index.ts +++ b/artemis-console-extension/artemis-extension/app/src/index.ts @@ -16,7 +16,7 @@ */ import '@hawtio/react/dist/index.css' import '@patternfly/react-core/dist/styles/base.css' -import 'artemis-console-plugin/styles'; +import '../../packages/artemis-console-plugin/dist/index.css'; import './index.css' // create an async boundary point, so remaining part of the application is loaded from different chunks diff --git a/artemis-console-extension/artemis-extension/app/webpack.config.cjs b/artemis-console-extension/artemis-extension/app/webpack.config.cjs index 2dc367b..30711f3 100644 --- a/artemis-console-extension/artemis-extension/app/webpack.config.cjs +++ b/artemis-console-extension/artemis-extension/app/webpack.config.cjs @@ -175,6 +175,13 @@ module.exports = (webpackEnv, args) => { jsc: { parser: { syntax: 'typescript', + tsx: true, + }, + transform: { + react: { + runtime: 'automatic', // <- enables new JSX transform + importSource: 'react', + }, }, }, }, @@ -212,7 +219,7 @@ module.exports = (webpackEnv, args) => { { test: /\.md$/i, type: 'asset/source', - }, + } ] }, ignoreWarnings: [ @@ -222,14 +229,8 @@ module.exports = (webpackEnv, args) => { ], resolve: { extensions: ['.ts', '.tsx', '.js', '.cjs', '.jsx'], - // To resolve errors for @module-federation/utilities 2.x - // https://github.com/module-federation/universe/issues/827 - // fallback: { - // path: require.resolve('path-browserify'), - // os: require.resolve('os-browserify'), - // }, - symlinks: true, // with symlinks: false, `webpaack server` doesn't reload on change in the package... alias: { + 'artemis-console-plugin': path.resolve(__dirname, '../packages/artemis-console-plugin/src'), '@thumbmarkjs/thumbmarkjs': path.join(__dirname, '../node_modules/@thumbmarkjs/thumbmarkjs/dist/thumbmark.esm.js'), }, }, @@ -330,6 +331,10 @@ module.exports = (webpackEnv, args) => { }, writeToDisk: true }, + watchFiles: [ + path.resolve(__dirname, 'src/**/*'), + path.resolve(__dirname, '../packages/artemis-console-plugin/**/*'), + ], setupMiddlewares: (middlewares, devServer) => { // Enabling branding in dev mode devServer.app.use((req, _, next) => { --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information, visit: https://activemq.apache.org/contact
