Skip to content

Commit

Permalink
revert: fix(@angular/build): show error when Node.js built-ins are us…
Browse files Browse the repository at this point in the history
…ed during ng serve

This commit reverts 06f478b

Closes: #29077
alan-agius4 committed Dec 9, 2024
1 parent b3c6c7e commit fc553c1
Showing 2 changed files with 0 additions and 46 deletions.
20 changes: 0 additions & 20 deletions packages/angular/build/src/tools/vite/utils.ts
Original file line number Diff line number Diff line change
@@ -69,26 +69,6 @@ export function getDepOptimizationConfig({
thirdPartySourcemaps: boolean;
}): DepOptimizationConfig {
const plugins: ViteEsBuildPlugin[] = [
{
name: 'angular-browser-node-built-in',
setup(build) {
// This namespace is configured by vite.
// @see: https://github.com/vitejs/vite/blob/a1dd396da856401a12c921d0cd2c4e97cb63f1b5/packages/vite/src/node/optimizer/esbuildDepPlugin.ts#L109
build.onLoad({ filter: /.*/, namespace: 'browser-external' }, (args) => {
if (!isBuiltin(args.path)) {
return;
}

return {
errors: [
{
text: `The package "${args.path}" wasn't found on the file system but is built into node.`,
},
],
};
});
},
},
{
name: `angular-vite-optimize-deps${ssr ? '-ssr' : ''}${
thirdPartySourcemaps ? '-vendor-sourcemap' : ''
26 changes: 0 additions & 26 deletions tests/legacy-cli/e2e/tests/vite/browser-node-module-dep-error.ts

This file was deleted.

0 comments on commit fc553c1

Please sign in to comment.