5.25.0 has broken my builds
See original GitHub issueBug report
I have a Laravel app which uses blade.php for browser-side content, with some small <script> sections using JQuery. JQuery is part of the vendor.js chunk created by Webpack, via Laravel Mix
When build with 5.24.4, everything works as expected
What is the current behavior?
However, with 5.25, the bundles are created but when a page loads and attempts to use JQuery I get the dreaded…
ReferenceError: $ is not defined
error in the browser console.
The only difference in the created bundles appears to be the new chunk loading code in manifest.js, and the
__webpack_require__
section at the tail of each created file.
If the current behavior is a bug, please provide the steps to reproduce.
Probably difficult to provide this as it’s a large project - I will try and get a minimal example.
What is the expected behavior? “$” should be defined.
Other relevant information: webpack version: 5.25.0 Node.js version: this is a client-side issue. Operating System: Windows 10 Additional tools:
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:17 (8 by maintainers)
Top GitHub Comments
Hi! I’m one of the people who works on Mix. I’d be happy to help where I can with this!
Yep this happens because we split CSS using
splitChunks
with a filename test + type: css/mini-extract + enforce: trueI thing bug on
Laravel Mix
side, as you can see no reports from other developers