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

**URL:** https://forum.babylonjs.com/t/webpack-will-not-compile-myn-application-after-upgrade-from-babylon-5-21-0-to-the-5-22-0/33597
**Category:** Questions
**Created:** [September 1, 2022, 7:41pm UTC](https://forum.babylonjs.com/t/webpack-will-not-compile-myn-application-after-upgrade-from-babylon-5-21-0-to-the-5-22-0/33597 "2022-09-01T19:41:59Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![DANIEL\_S](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/daniel_s/32/9709_2.png) [@DANIEL\_S](https://forum.babylonjs.com/u/DANIEL_S)
#### Post date: [September 1, 2022, 7:41pm UTC](https://forum.babylonjs.com/t/webpack-will-not-compile-myn-application-after-upgrade-from-babylon-5-21-0-to-the-5-22-0/33597/1 "2022-09-01T19:41:59Z")

</div>

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.

 ![Screenshot 2022-09-01 at 22.46.45](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/0/8/0852e04ec5f0bf9120697a40604d3c1ecf18e2ad.png)

---

<div class="post-metadata">

### Author: ![neu5](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/neu5/32/24720_2.png) [@neu5](https://forum.babylonjs.com/u/neu5)
#### Post date: [September 1, 2022, 8:14pm UTC](https://forum.babylonjs.com/t/webpack-will-not-compile-myn-application-after-upgrade-from-babylon-5-21-0-to-the-5-22-0/33597/2 "2022-09-01T20:14:02Z")

</div>

Hi @DANIEL_S,

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

> <https://stackoverflow.com/questions/59972341/how-to-make-webpack-accept-optional-chaining-without-babel>

---

<div class="post-metadata">

### Author: ![DANIEL\_S](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/daniel_s/32/9709_2.png) [@DANIEL\_S](https://forum.babylonjs.com/u/DANIEL_S)
#### Post date: [September 1, 2022, 8:30pm UTC](https://forum.babylonjs.com/t/webpack-will-not-compile-myn-application-after-upgrade-from-babylon-5-21-0-to-the-5-22-0/33597/3 "2022-09-01T20:30:14Z")

</div>

> [@neu5](#):
>
> [javascript - How to make webpack accept optional chaining without babel - Stack Overflow](https://stackoverflow.com/questions/59972341/how-to-make-webpack-accept-optional-chaining-without-babel)

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/](https://nx.dev/) build tools. However I do use optional chaining abit in other parts of my application and it works just fine.

---

<div class="post-metadata">

### Author: ![neu5](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/neu5/32/24720_2.png) [@neu5](https://forum.babylonjs.com/u/neu5)
#### Post date: [September 1, 2022, 8:41pm UTC](https://forum.babylonjs.com/t/webpack-will-not-compile-myn-application-after-upgrade-from-babylon-5-21-0-to-the-5-22-0/33597/4 "2022-09-01T20:41:30Z")

</div>

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

> **[Webpack 5 Migration](https://nx.dev/recipe/webpack-5#webpack-5-migration)**
>
> Next generation build system with first class monorepo support and powerful integrations.

at the Nx page. Maybe that will help

---

<div class="post-metadata">

### Author: ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)
#### Post date: [September 1, 2022, 9:19pm UTC](https://forum.babylonjs.com/t/webpack-will-not-compile-myn-application-after-upgrade-from-babylon-5-21-0-to-the-5-22-0/33597/5 "2022-09-01T21:19:42Z")

</div>

cc @RaananW

---

<div class="post-metadata">

### Author: ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)
#### Post date: [September 1, 2022, 9:19pm UTC](https://forum.babylonjs.com/t/webpack-will-not-compile-myn-application-after-upgrade-from-babylon-5-21-0-to-the-5-22-0/33597/6 "2022-09-01T21:19:45Z")

</div>



---

<div class="post-metadata">

### Author: ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)
#### Post date: [September 1, 2022, 9:41pm UTC](https://forum.babylonjs.com/t/webpack-will-not-compile-myn-application-after-upgrade-from-babylon-5-21-0-to-the-5-22-0/33597/7 "2022-09-01T21:41:46Z")

</div>

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

---

<div class="post-metadata">

### Author: ![DANIEL\_S](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/daniel_s/32/9709_2.png) [@DANIEL\_S](https://forum.babylonjs.com/u/DANIEL_S)
#### Post date: [September 2, 2022, 6:30am UTC](https://forum.babylonjs.com/t/webpack-will-not-compile-myn-application-after-upgrade-from-babylon-5-21-0-to-the-5-22-0/33597/8 "2022-09-02T06:30:51Z")

</div>

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

---

<div class="post-metadata">

### Author: ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)
#### Post date: [September 2, 2022, 7:39pm UTC](https://forum.babylonjs.com/t/webpack-will-not-compile-myn-application-after-upgrade-from-babylon-5-21-0-to-the-5-22-0/33597/9 "2022-09-02T19:39:11Z")

</div>


