Skip to content

Commit

Permalink
refactor(@angular/cli): remove webpack nodeJS globals shimming
Browse files Browse the repository at this point in the history
BREAKING CHANGE:
Libraries/Packages must contain a web version if not web specific.
  • Loading branch information
clydin authored and filipesilva committed Feb 28, 2018
1 parent 2543d4f commit c7a8b61
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
12 changes: 1 addition & 11 deletions packages/@angular/cli/models/webpack-configs/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,16 +124,6 @@ export function getBrowserConfig(wco: WebpackConfigOptions) {
deployUrl: buildOptions.deployUrl,
}),
]),
node: {
fs: 'empty',
global: true,
crypto: 'empty',
tls: 'empty',
net: 'empty',
process: true,
module: false,
clearImmediate: false,
setImmediate: false
}
node: false,
};
}
5 changes: 0 additions & 5 deletions packages/@angular/cli/models/webpack-configs/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,11 +271,6 @@ export function getCommonConfig(wco: WebpackConfigOptions) {
warnings: buildOptions.verbose,
safari10: true,
compress: {
// Disabled because of an issue with Mapbox GL when using the Webpack node global:
// https://github.com/mapbox/mapbox-gl-js/issues/4359#issuecomment-303880888
// https://github.com/angular/angular-cli/issues/5804
// https://github.com/angular/angular-cli/pull/7931
typeofs : false,
pure_getters: buildOptions.buildOptimizer,
// PURE comments work best with 3 passes.
// See https://github.com/webpack/webpack/issues/2899#issuecomment-317425926.
Expand Down

1 comment on commit c7a8b61

@vecernik
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you make this change configurable, please? It breaks a build with Faye, which uses "global" for some reason.

Please sign in to comment.