Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

Conversation

filipesilva
Copy link
Contributor

Copy link
Member

@clydin clydin left a comment

Choose a reason for hiding this comment

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

Can you try re-using the browser splitChunks configuration (this appears to have lagged behind): https://github.com/angular/devkit/blob/master/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/browser.ts#L103

@filipesilva
Copy link
Contributor Author

@clydin updated with the applicable options

const moduleName = module.nameForCondition ? module.nameForCondition() : '';
return /[\\/]node_modules[\\/]/.test(moduleName)
&& !chunks.some(({ name }) => name === 'polyfills');
test: (module: { nameForCondition?: () => string }) => {
Copy link
Member

Choose a reason for hiding this comment

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

This should be able to be reduced to test: /[\\/]node_modules[\\/]/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Coolio, done.

@clydin clydin merged commit d49d7fc into angular:master May 31, 2018
@filipesilva filipesilva deleted the test-split-polyfills branch July 23, 2018 12:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants