Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

fix(plugin): use compiler.webpack when possible #1884

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

Merged
merged 1 commit into from
Oct 10, 2021
Merged

fix(plugin): use compiler.webpack when possible #1884

merged 1 commit into from
Oct 10, 2021

Conversation

sevilyilmaz
Copy link
Contributor

@sevilyilmaz sevilyilmaz commented Oct 4, 2021

Applies the fix (f7ee30b) that resolved the same issue on v15.

Context

When there are different versions of Webpack used in a repo (for example, one is added to the repo and the other one is coming from a node module) Webpack loses its reference to the Compiler object. The plugins no longer need to require('webpack') in Webpack 5. It's recommended to use compiler.webpack where possible.

Related comments of the Webpack authors/contributors in a similar issue: webpack/webpack#12606 (comment), webpack/webpack#12606 (comment)

Additional

I had to use ts-ignore because the branch uses webpack@4 types.

Related to #1781

Applies the fix (f7ee30b) that fixes
the same issue on v15.

Related to #1781
Copy link
Member

@haoqunjiang haoqunjiang left a comment

Choose a reason for hiding this comment

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

Thanks!

@haoqunjiang haoqunjiang merged commit 820d23c into vuejs:next Oct 10, 2021
@sevilyilmaz sevilyilmaz deleted the webpack-5-compiler-normal-module branch October 10, 2021 10:23
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.

2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.