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

Support, update to webpack 5 #3135

Merged
merged 2 commits into from
Oct 31, 2021
Merged

Support, update to webpack 5 #3135

merged 2 commits into from
Oct 31, 2021

Conversation

askvortsov1
Copy link
Member

**Fixes #2855 **

Changes proposed in this pull request:

  • Support webpack 5 by separating JS entries with semicolons
  • Update core to use webpack 5
  • Update core to use expose-loader v2

Reviewers should focus on:
This also requires changes to flarum-webpack-config. These are trivial, so I've pushed them directly to main, but I've tagged the version as 2.0.0-beta.2 pending review. Once this is approved, I'll bump / publish that as v2.0.0, update this PR to use that, and then merge.

https://github.com/flarum/flarum-webpack-config

Necessity

  • Has the problem that is being solved here been clearly explained?
  • If applicable, have various options for solving this problem been considered?
  • For core PRs, does this need to be in core, or could it be in an extension?
  • Are we willing to maintain this for years / potentially forever?

Confirmed

  • Frontend changes: tested on a local Flarum installation.
  • Backend changes: tests are green (run composer test).
  • Core developer confirmed locally this works as intended.
  • Tests have been added, or are not appropriate here.

@davwheat
Copy link
Member

davwheat commented Oct 27, 2021

Isn't this breaking, and should be saved for 2.0? I remember some issues getting Webpack 4 + 5 to work together, or are these not an issue anymore?

@askvortsov1
Copy link
Member Author

Isn't this breaking, and should be saved for 2.0? I remember some issues getting Webpack 4 + 5 to work together, or are these not an issue anymore?

The problem is if you have v5 extensions with v4 core. v5 core with v4 extensions should work fine

@davwheat
Copy link
Member

And it even reduces our bundle size! 🎉

@askvortsov1 askvortsov1 merged commit cb64051 into master Oct 31, 2021
@askvortsov1 askvortsov1 deleted the as/webpack-5-support branch October 31, 2021 18:21
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.

Not working with Webpack v5.24
3 participants