Webpack will not compile myn application after upgrade from babylon 5.21.0 to the 5.22.0

I cannot get my setup to work as before nothing has changed, I have just upgraded the babylon.js dependencies from a 5.21.0. to 5.22.0 and then I have all these errors about missing loaders.


Looks like your Webpack is not understanding the optional chaining feature of JavaScript.
What version of Webpack do you have in your project?
If it is possible upgrading the Webpack version should help.
You can find more information here


Thanks @neu5, I don’t directly configure my webpack except for a few overrides as I am working in a monorepo structure using https://nx.dev/ build tools. However I do use optional chaining abit in other parts of my application and it works just fine.

I am not familiar with the Nx.
Can you check what version of Webpack is used in the part that the BabylonJS is being involved?
I’ve found something like that

at the Nx page. Maybe that will help

1 Like

cc @RaananW

What webpack version are you using?
Webpack 4.0 doesn’t like modern syntax and requires transpiling your code.

Still using Webpack 4.0, I’ll Update my Nx tools and see if that doesn’t break the builds