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

fix(webpack-config): split chunks can fail in dev mode #3911

Merged
merged 1 commit into from
Oct 27, 2023

Conversation

SychO9
Copy link
Member

@SychO9 SychO9 commented Oct 27, 2023

Changes proposed in this pull request:

  • When running yarn dev webpack changes certain behavior that can break spit chunks.
    • In the example where TagDiscussionModal extends from TagSelectionModal and both components are split chunks. The normal wted behavior in yarn build is two separate chunks where TagDiscussionModal also has the TagSelectionModal component inside. In yarn dev webpack attempts to speed up its process by just async loading TagSelectionModal first. Since our internal process can only handle explicit async loading (to determine the source package/extension), this behavior errors out.
    • By configuring webpack's auto async calls to a max of 1, this is prevented.

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.

@SychO9 SychO9 added type/bug javascript Pull requests that update Javascript code webpack-config labels Oct 27, 2023
@SychO9 SychO9 requested a review from a team as a code owner October 27, 2023 14:22
@SychO9 SychO9 merged commit 577fc3e into 2.x Oct 27, 2023
@SychO9 SychO9 deleted the sm/split-chunks-fails-dev-mode branch October 27, 2023 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
javascript Pull requests that update Javascript code type/bug webpack-config
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant