chore(NA): updating used polyfills using 3rd party library (#218020)

Closes https://github.com/elastic/kibana-operations/issues/267

This PR is a follow up from the webpack v5 upgrade which makes sure we
stop using the old non maintained webpack v4 polyfills library and use
instead a new supported library called `node-stdlib-browser`.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Tiago Costa 2025-04-30 21:35:22 +01:00 committed by GitHub
parent 91aadb3d39
commit aac2d4788a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 278 additions and 214 deletions

View file

@ -295,6 +295,14 @@ export function getWebpackConfig(
vega: Path.resolve(worker.repoRoot, 'node_modules/vega/build-es5/vega.js'),
'react-dom$': 'react-dom/profiling',
'scheduler/tracing': 'scheduler/tracing-profiling',
buffer: [
Path.resolve(worker.repoRoot, 'node_modules/node-stdlib-browser/node_modules/buffer'),
require.resolve('buffer'),
],
punycode: [
Path.resolve(worker.repoRoot, 'node_modules/node-stdlib-browser/node_modules/punycode'),
require.resolve('punycode'),
],
},
},