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

Webpack optimization configuration is not supported anymore #587

Closed
BenoitZugmeyer opened this issue Feb 12, 2024 · 4 comments · Fixed by #588
Closed

Webpack optimization configuration is not supported anymore #587

BenoitZugmeyer opened this issue Feb 12, 2024 · 4 comments · Fixed by #588

Comments

@BenoitZugmeyer
Copy link

Before v5, karma-webpack built one independent bundle per spec file that included every spec dependencies.

With v5.0.0, the new behavior is to use a single common chunk that includes all the code (source and spec). We were able to roll back to the previous behavior by leveraging the optimization webpack option (see code).

With v5.0.1, it is now forbidden to set the optimization webpack option (see f2327b1), so our workaround does not work anymore, and upgrading to v5.0.1 breaks our test suite.

  • Operating System: macOS
  • Node Version: 18.19.0
  • NPM Version: N/A (Yarn 3.8.0)
  • webpack Version: 5.90.0
  • karma-webpack Version: 5.0.1

Expected Behavior

karma-webpack v5.0.1 should not introduce a breaking change and should still support the optimization webpack option. As an alternative, karma-webpack could introduce an option to restore pre-v5 behavior (one independent bundle per spec file).

Actual Behavior

karma-webpack v5.0.1 does not support the optimization webpack option.

How Do We Reproduce?

git clone https://github.com/DataDog/browser-sdk/
yarn
yarn add -D karma-webpack@5.0.1
yarn test
BenoitZugmeyer added a commit to DataDog/browser-sdk that referenced this issue Feb 12, 2024
karma-webpack introduced a breaking change in v5.0.1 that breaks our
test suite: codymikol/karma-webpack#587
BenoitZugmeyer added a commit to DataDog/browser-sdk that referenced this issue Feb 12, 2024
karma-webpack introduced a breaking change in v5.0.1 that breaks our
test suite: codymikol/karma-webpack#587
codymikol pushed a commit that referenced this issue Feb 13, 2024
we should not dictate this behavior, just warning
users that this may lead to unexpected behavior
should suffice.

Fixes #587
codymikol added a commit that referenced this issue Feb 13, 2024
we should not dictate this behavior, just warning
users that this may lead to unexpected behavior
should suffice.

Fixes #587

Co-authored-by: Cody Mikol <cody.mikol@boltstech.com>
@dlarocque
Copy link
Contributor

Hi @codymikol, we were happy to see 5.0.1 released, and wanted to upgrade in the Firebase JS SDK so that we can remove our usage of patch-package to patch in our fix (f734b10) from a few years ago onto 5.0.0. It turns out we relied on setting optimization configurations, so upgrading to 5.0.1 is breaking for us.

When can we expect this fix to be released?

@codymikol
Copy link
Owner

I'll cut a release this weekend

@dlarocque
Copy link
Contributor

I'll cut a release this weekend

That's great news for us, thank you!!

@dlarocque
Copy link
Contributor

dlarocque commented Jul 22, 2024

I'll cut a release this weekend

@codymikol Any updates on when we can expect to see this fix released?

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 a pull request may close this issue.

3 participants