Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a Set to store modules in a chunk #4764

Merged
merged 1 commit into from
May 16, 2017
Merged

Use a Set to store modules in a chunk #4764

merged 1 commit into from
May 16, 2017

Conversation

sokra
Copy link
Member

@sokra sokra commented Apr 21, 2017

What kind of change does this PR introduce?
refactoring

Did you add tests for your changes?
existing tests

If relevant, link to documentation update:
N/A

Summary
Use a Set to store modules in a chunk

Does this PR introduce a breaking change?
yes

Other information

@webpack-bot
Copy link
Contributor

Thank you for your pull request! The most important CI builds succeeded, we’ll review the pull request soon.

@sokra sokra force-pushed the perf/chunks-set branch from f6f22ef to e1bac32 Compare May 16, 2017 09:51
@sokra sokra changed the base branch from master to next May 16, 2017 10:02
@sokra sokra merged commit 77a3c87 into next May 16, 2017
@sokra sokra deleted the perf/chunks-set branch May 16, 2017 12:36
joshwiens added a commit to webpack-contrib/extract-text-webpack-plugin that referenced this pull request Jun 23, 2017
 BREAKING CHANGE: Updates to `Chunk.mapModules`. This release is not backwards compatible with `Webpack 2.x` due to breaking changes in webpack/webpack#4764
joshwiens added a commit to webpack-contrib/extract-text-webpack-plugin that referenced this pull request Jun 24, 2017
  BREAKING CHANGE: Updates to `Chunk.mapModules | forEachModule | getNumberOfModules`. This release is not backwards compatible with `Webpack 2.x` due to breaking changes in webpack/webpack#4764
joshwiens added a commit to webpack-contrib/extract-text-webpack-plugin that referenced this pull request Jul 7, 2017
  BREAKING CHANGE: Updates to `Chunk.mapModules | forEachModule | getNumberOfModules`. This release is not backwards compatible with `Webpack 2.x` due to breaking changes in webpack/webpack#4764
joshwiens added a commit to webpack-contrib/extract-text-webpack-plugin that referenced this pull request Jul 7, 2017
- refactor: Replace usage of chunk.modules with forEachModule, mapModules ect..

  BREAKING CHANGE: Updates to `Chunk.mapModules | forEachModule | getNumberOfModules`. This release is not backwards compatible with `Webpack 2.x` due to breaking changes in webpack/webpack#4764
joshwiens added a commit to webpack-contrib/extract-text-webpack-plugin that referenced this pull request Jul 10, 2017
- refactor: Pass a unique compiler name to get child compilation [483](#483)
- refactor: Apply webpack-defaults [542](#542)

BREAKING CHANGE: Enforces `engines` of `"node": ">=4.3.0 < 5.0.0 || >= 5.10`

- refactor: DeprecationWarning: Chunk.modules [543](#543)

BREAKING CHANGE: Updates to `Chunk.mapModules`. This release is not backwards compatible with `Webpack 2.x` due to breaking changes in webpack/webpack#4764

- fix: css generation order issue see: webpack/webpack#5225

BREAKING CHANGE: Enforces `peerDependencies` of `"webpack": "^3.1.0"`.
@twhid
Copy link

twhid commented Jul 19, 2017

Wondering what the thinking was with deprecating chunk.modules in favor chunk.mapModules and chunk.forEachModule. To access other array methods you now need to map the modules through an identity function (eg here), which seems unnecessary to someone (like myself) that isn't an expert on the innards of webpack.

Is there a downside to having a getter named modules that returns Array.from(this._modules) ?

@twhid
Copy link

twhid commented Jul 19, 2017

There is a chunk.getModules that returns an array of modules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants