Skip to content

Commit c1ae541

Browse files
authored
Update webpack for browser to polyfill process. (#19033)
* Update webpack for browser to polyfill process. * Use node polyfill webpack plugin * Revert webpack config changes * Revert "Handle `process` usage in browser scenario. (#19029)" This reverts commit e786d62.
1 parent e786d62 commit c1ae541

4 files changed

Lines changed: 526 additions & 66 deletions

File tree

build/webpack/webpack.extension.browser.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
'use strict';
77

88
const path = require('path');
9+
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin');
910

1011
const packageRoot = path.resolve(__dirname, '..', '..');
1112
const outDir = path.resolve(packageRoot, 'dist');
@@ -34,6 +35,7 @@ const nodeConfig = (_, { mode }) => ({
3435
extensions: ['.ts', '.js'],
3536
fallback: { path: require.resolve('path-browserify') },
3637
},
38+
plugins: [new NodePolyfillPlugin()],
3739
externals: {
3840
vscode: 'commonjs vscode',
3941

0 commit comments

Comments
 (0)