Skip to content

Commit c7a8b61

Browse files
clydinfilipesilva
authored andcommitted
refactor(@angular/cli): remove webpack nodeJS globals shimming
BREAKING CHANGE: Libraries/Packages must contain a web version if not web specific.
1 parent 2543d4f commit c7a8b61

File tree

2 files changed

+1
-16
lines changed

2 files changed

+1
-16
lines changed

Diff for: packages/@angular/cli/models/webpack-configs/browser.ts

+1-11
Original file line numberDiff line numberDiff line change
@@ -124,16 +124,6 @@ export function getBrowserConfig(wco: WebpackConfigOptions) {
124124
deployUrl: buildOptions.deployUrl,
125125
}),
126126
]),
127-
node: {
128-
fs: 'empty',
129-
global: true,
130-
crypto: 'empty',
131-
tls: 'empty',
132-
net: 'empty',
133-
process: true,
134-
module: false,
135-
clearImmediate: false,
136-
setImmediate: false
137-
}
127+
node: false,
138128
};
139129
}

Diff for: packages/@angular/cli/models/webpack-configs/common.ts

-5
Original file line numberDiff line numberDiff line change
@@ -271,11 +271,6 @@ export function getCommonConfig(wco: WebpackConfigOptions) {
271271
warnings: buildOptions.verbose,
272272
safari10: true,
273273
compress: {
274-
// Disabled because of an issue with Mapbox GL when using the Webpack node global:
275-
// https://github.com/mapbox/mapbox-gl-js/issues/4359#issuecomment-303880888
276-
// https://github.com/angular/angular-cli/issues/5804
277-
// https://github.com/angular/angular-cli/pull/7931
278-
typeofs : false,
279274
pure_getters: buildOptions.buildOptimizer,
280275
// PURE comments work best with 3 passes.
281276
// See https://github.com/webpack/webpack/issues/2899#issuecomment-317425926.

0 commit comments

Comments
 (0)