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

Update to chunk.mapModules #9

Merged
merged 1 commit into from Aug 15, 2017
Merged

Conversation

thebuilder
Copy link

Chunk.modules is deprecated in Webpack 3.0.0 - replaced with the mapModules method.
Added with fallback, to support Webpack 2.0.0

Chunk.modules is deprecated in Webpack 3.0.0 - replaced with the mapModules method.
Added with fallback, to support Webpack 2.0.0
@alexindigo
Copy link
Owner

Thanks for the PR. I'm curious if mapModules have the same structure or there are more changes needed to be done to support webpack 3?

@weaverryan
Copy link

This is safe to merge - see a similar fix in extract-webpack-text-plugin: https://github.com/webpack-contrib/extract-text-webpack-plugin/pull/553/files#diff-1fdf421c05c1140f6d71444ea2b27638R148

The change (webpack/webpack#4764) was just done for performance - and the mapModules was made as a bridge from old to new.

Our test suite for webpack-encore also passes with this change :).

+1!

@weaverryan
Copy link

Friendly ping! :)

@dogmatico dogmatico merged commit bfc4722 into alexindigo:master Aug 15, 2017
weaverryan added a commit to symfony/webpack-encore that referenced this pull request Sep 2, 2017
This PR was merged into the master branch.

Discussion
----------

Intercept Webpack output during functional tests

This PR replaces `process.stdout.write` by an empty function when running webpack in each functional test (fixes #47).

It also sets the `silent` option of the Zombie.js browser to true to avoid displaying things like:

```
Download the Vue Devtools extension for a better development experience:
https://github.com/vuejs/vue-devtools
You are running Vue in development mode.
Make sure to turn on production mode when deploying for production.
See more tips at https://vuejs.org/guide/deployment.html
```

The only "noisy" message left should be `DeprecationWarning: Chunk.modules is deprecated. Use Chunk.getNumberOfModules/mapModules/forEachModule/containsModule instead` since it is sent to stderr (should be fixed when alexindigo/webpack-chunk-hash#9 is released).

Commits
-------

a74869b Intercept output during functional tests (fixes #47)
@weaverryan
Copy link

Ping! Could you tag a new release? We haven’t been able to enjoy this update yet :)

@alexindigo
Copy link
Owner

@weaverryan I published 0.5.0 with latest commits. Sorry for the delay.

@weaverryan
Copy link

No worries - thank you! :)

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

Successfully merging this pull request may close these issues.

None yet

4 participants