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
compileBooleanMatcher fails when prefix and suffix overlap #12255
Comments
Thanks for the issue and the PR ⭐ |
Fix #12255: compileBooleanMatcher fails when prefix and suffix overlap
Hi webpack team: May I ask what is the release policy of the project? We are having some discussions around using a temporary patched webpack version for our project until the new release fixing this issue happens, but we are unsure it is worth the hassle, as it looks you release very often :-). However, I would like to know if you have a fixed cadence, or do it on demand, or simply when you have time to do it. Thanks in advance and also thanks for the great work you do. |
Release will be after holidays |
Perfect, then. Thanks 👍 |
Because it fixes webpack/webpack#12255
Bug report
What is the current behavior?
Currently, the compileBooleanMatcher function is being fooled when the common prefix and suffix of two expressions overlap. This, in turn, leads to incorrect code being generated by JsonpChunkLoadingRuntimeModule which, in my case, tries to load a consumed module as if it had been bundled locally, thus making the web server return a
Not found
error and failing the page load.If the current behavior is a bug, please provide the steps to reproduce.
I cannot send a small test project to reproduce it because:
Anyway, I'm going to fix this in a following PR with a test, where it is easy to see why the production code was wrong and, looking at the test, what I was expecting to work correctly.
What is the expected behavior?
The expected behavior is that the computed regexp matches the setup correctly (see the unit test in the associated PR).
Other relevant information:
webpack version: 5.11.0
Node.js version: 12.16.3
Operating System: ArchLinux
Additional tools: yarn 1.22.4
The text was updated successfully, but these errors were encountered: