From ebe387992ce5d135cdd6b900156c17a082aeb75f Mon Sep 17 00:00:00 2001 From: Gianluca Zuccarelli Date: Fri, 10 Jan 2025 12:32:58 +0000 Subject: [PATCH] cockpit/webpack: path polyfill We need to polyfill the `path` plugin for the cockpitApi store --- cockpit/webpack.config.ts | 3 +++ package-lock.json | 1 + package.json | 1 + 3 files changed, 5 insertions(+) diff --git a/cockpit/webpack.config.ts b/cockpit/webpack.config.ts index 6f0c6189..910bc9c5 100644 --- a/cockpit/webpack.config.ts +++ b/cockpit/webpack.config.ts @@ -28,6 +28,9 @@ module.exports = { devtool, plugins, resolve: { + fallback: { + path: require.resolve('path-browserify'), + }, modules: [ 'node_modules', // this tells webpack to check `node_modules` diff --git a/package-lock.json b/package-lock.json index a53c9454..f8104db3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -75,6 +75,7 @@ "moment": "2.30.1", "msw": "2.7.0", "npm-run-all": "4.1.5", + "path-browserify": "1.0.1", "postcss-scss": "4.0.9", "react-chartjs-2": "5.3.0", "redux-mock-store": "1.5.5", diff --git a/package.json b/package.json index 8b19ea97..723c919a 100644 --- a/package.json +++ b/package.json @@ -73,6 +73,7 @@ "moment": "2.30.1", "msw": "2.7.0", "npm-run-all": "4.1.5", + "path-browserify": "1.0.1", "postcss-scss": "4.0.9", "react-chartjs-2": "5.3.0", "redux-mock-store": "1.5.5",