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

Replace 'compile' with 'invalid' hook. #288

Merged
merged 1 commit into from
Mar 2, 2018

Conversation

qazbnm456
Copy link
Contributor

Following #260.

As suggested webpack/webpack#6633 (comment), we rather iterate each compiler and register the 'compile' hook when getting a MultiCompiler instance than register the 'invalid' hook.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.8%) to 79.512% when pulling ce0c280 on qazbnm456:master into ae79f6a on glenjamin:master.

@coveralls
Copy link

coveralls commented Mar 2, 2018

Coverage Status

Coverage remained the same at 80.296% when pulling 5e7112f on qazbnm456:master into ae79f6a on glenjamin:master.

@glenjamin
Copy link
Collaborator

The logic should be duplicated in the lower section to maintain compatibility with webpack v3.

It might be best to switch to the invalid event as recommended in the linked webpack issue - I can't see any mention there of iterating the compiler instances.

@qazbnm456
Copy link
Contributor Author

The author recommends the iterating way here, but yeah, using invalid hook seems to be the easiest solution actually. Though, I don’t know if there’s a difference between compile and invalid hooks. :confuse:

I’ll make the change later and notify you when I’m done!

@qazbnm456
Copy link
Contributor Author

I've revised the code. PTAL, thanks!

@qazbnm456 qazbnm456 changed the title Iterate each compiler and register the compile hook when getting a MultiCompiler instance. Replace 'compile' with 'invalid' hook. Mar 2, 2018
@glenjamin glenjamin merged commit 6b756cc into webpack-contrib:master Mar 2, 2018
@glenjamin
Copy link
Collaborator

Released in v2.21.2

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

3 participants