Re-remove webpack (again again)#300860
Conversation
This reverts commit 1d31c3c.
There was a problem hiding this comment.
Pull request overview
This PR removes the remaining webpack-based extension bundling infrastructure from the repo build pipeline, while keeping the Monaco test packaging step working by adding webpack (and related loaders) as local devDependencies under test/monaco.
Changes:
- Move Monaco test bundling to use a locally installed
webpackbinary and add the required webpack toolchain dependencies totest/monaco. - Remove webpack-related dependencies from the root
package.json/package-lock.json. - Delete legacy extension webpack tooling (
extensions/shared.webpack.config.mjs,extensions/mangle-loader.js) and remove webpack build paths from extension packaging tasks.
Reviewed changes
Copilot reviewed 6 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
test/monaco/package.json |
Switch bundle-webpack to webpack and add local webpack + loader devDependencies (plus postcss). |
test/monaco/package-lock.json |
Lockfile updates for the newly added Monaco-local webpack toolchain. |
package.json |
Remove root-level webpack-related dependencies and types. |
package-lock.json |
Remove lockfile entries related to the removed root-level webpack toolchain. |
extensions/shared.webpack.config.mjs |
Delete shared webpack config for extensions. |
extensions/mangle-loader.js |
Delete webpack loader used for mangling in production builds. |
build/lib/extensions.ts |
Remove webpack-based extension packaging code paths (including webpackExtensions) and related imports. |
build/gulpfile.extensions.ts |
Remove logic that discovered/ran webpack configs for web extensions; keep esbuild-only flow. |
Files not reviewed (1)
- test/monaco/package-lock.json: Language not supported
You can also share your feedback on Copilot code review. Take the survey.
| function fromLocal(extensionPath: string, forWeb: boolean, _disableMangle: boolean): Stream { | ||
|
|
||
| const esbuildConfigFileName = forWeb | ||
| ? 'esbuild.browser.mts' | ||
| : 'esbuild.mts'; | ||
|
|
||
| const webpackConfigFileName = forWeb | ||
| ? `extension-browser.webpack.config.js` | ||
| : `extension.webpack.config.js`; | ||
|
|
||
| const hasEsbuild = fs.existsSync(path.join(extensionPath, esbuildConfigFileName)); | ||
| const hasWebpack = fs.existsSync(path.join(extensionPath, webpackConfigFileName)); | ||
|
|
There was a problem hiding this comment.
fromLocal still takes a disableMangle argument (now renamed to _disableMangle) but it is no longer used after removing the webpack/mangle-loader pipeline. Either remove this parameter from fromLocal (and its callers) or explicitly document that it’s currently unused/no-op, so callers don’t assume it affects extension packaging.
This reverts commit 1d31c3c.
Creating full build to make sure terrapin has all the packages now: https://dev.azure.com/monacotools/Monaco/_build/results?buildId=418467&view=results