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

feat: Webpack 5 Support #5611

Closed
wants to merge 1 commit into from

Conversation

ScriptedAlchemy
Copy link

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Underlying tools
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

Other information:
Initial implementation to support Webpack 5, not sure about dev mode - but this works for my needs. Preloading turned off because some hooks need to be updated, other than that if you use yarn resolution to override webpack with v5, builds are successful under my configuration.

This can serve as a starting point. I'm not a Vue user but do have some builds still in Vue. Will PR project to the extent I require for Module Federation to be operable.

Its recommended that the community progress this source as this is a good-faith PR. Yarn patching works for me

Initial implementation to support Webpack 5
@houd1ni
Copy link

houd1ni commented Jul 15, 2020

Hi ! Why it's still ^4.0.0 in package.json ? And all these checks would be of the same result always, if I'm not wrong.

@matrunchyk
Copy link

Hey guys, is there some update regarding this PR? Do you want to merge it?

Thank you for your efforts.

@ScriptedAlchemy
Copy link
Author

Webpack 5 was released today. So if we can, that'd be great

@haoqunjiang
Copy link
Member

Thank you for the help!

This is a great starting point for webpack 5 support in Vue CLI. Though, I feel that there is still much work to do. Maybe we need to upgrade the dependencies in the codebase first (I'm doing it this week). Because without test coverage in CI, I don't feel confident enough to let these conditional statements get into the codebase. Besides that, I haven't decided what to do with the Node.js polyfills in webpack 5 yet. So I need some more time to think about it.

Thanks again!

@matrunchyk
Copy link

@sodatea Thanks for the response! Do you foresee any date when the WP5 support (including good tests coverage) may be added? Next months? This year? Q1/Q2 2021?

(Asking because we'd like to start a large project with module federation support, and still using Vue CLI)

@haoqunjiang
Copy link
Member

Early alpha in a month, stable release in this year.

@ScriptedAlchemy
Copy link
Author

Node polyfills. You could take a look at next.js and copy their utility function for automatically applying polyfills that webpack no longer covers.

Feel free to tag me if there's any questions regarding webpack upgrade.
I've upgraded quite a few OSS projects and am very familiar with webpack.

I'll take a look at what effort is involved in writing an npm package which works similar to webpack-node-externals, but for missing node polyfills

@nicooprat
Copy link

nicooprat commented Nov 25, 2020

Glad to see this coming! Just to be sure, would this work with Vue 2 & 3? I guess vue-cli is version agnostic...

@haoqunjiang
Copy link
Member

Hi, sorry for the delay. But we finally managed to ship an alpha version with most dependencies updated: https://github.com/vuejs/vue-cli/releases/tag/v5.0.0-alpha.0

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.

5 participants