# Webpack Issue upgrading from Babylon.js 6.49.0 to 8.15.1

**URL:** <https://forum.babylonjs.com/t/webpack-issue-upgrading-from-babylon-js-6-49-0-to-8-15-1/59394>\
**Category:** Bugs\
**Created:** [July 6, 2025, 3:46pm UTC](https://forum.babylonjs.com/t/webpack-issue-upgrading-from-babylon-js-6-49-0-to-8-15-1/59394 "2025-07-06T15:46:53Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_Scherotter1](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/michael_scherotter1/32/16678_2.png) [@Michael\_Scherotter1](https://forum.babylonjs.com/u/Michael_Scherotter1)\
**Post date:** [July 6, 2025, 3:46pm UTC](https://forum.babylonjs.com/t/webpack-issue-upgrading-from-babylon-js-6-49-0-to-8-15-1/59394/1 "2025-07-06T15:46:53Z")

</div>

I am in the process of upgrading my app from @babylonjs/core from 6.49.0 to 8.15.1 and have run into an issue with Webpack:  
on a page `https://localhost:8000/gallery/7f7bb756-50da-4bae-a0fe-e3b8b5d3e6b2/view`

Babylon.JS is making a request for this URL which is returning a 404:

`https://localhost:8000/gallery/7f7bb756-50da-4bae-a0fe-e3b8b5d3e6b2/vendors-node_modules_babylonjs_core_Shaders_ShadersInclude_bakedVertexAnimation_js-node_modul-3ca487.bundle.js`

During the Webpack build these are displayed:

```auto
assets by status 44.2 MiB [compared for emit]
  assets by chunk 3.35 MiB (id hint: vendors)
    asset vendors-node_modules_babylonjs_core_ShadersWGSL_pbr_fragment_js.bundle.js 421 KiB [compared for emit] (id hint: vendors)
    asset vendors-node_modules_babylonjs_core_Shaders_pbr_fragment_js.bundle.js 415 KiB [compared for emit] (id hint: vendors)
    asset vendors-node_modules_babylonjs_core_Animations_animationGroup_js.bundle.js 285 KiB [compared for emit] (id hint: vendors)
    + 25 assets
  + 102 assets

```

In my webpack.common.js is adds this to the dependOn list for the page entry:  
`bjsCore: ['@babylonjs/core', 'pepjs'],`

Do I need to include other packages now in that list?

I have tried adding the other BJS packages but that didn’t fix it:

```auto
    bjsCore: [
      '@babylonjs/core', 
      'pepjs', 
      '@babylonjs/materials', 
      '@babylonjs/serializers',
      '@babylonjs/loaders'
    ],

```

Thanks,  
Michael

---

<div class="post-metadata">

**Author:** ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)\
**Post date:** [July 7, 2025, 8:12am UTC](https://forum.babylonjs.com/t/webpack-issue-upgrading-from-babylon-js-6-49-0-to-8-15-1/59394/2 "2025-07-07T08:12:50Z")

</div>

cc @amoebachant

---

<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:** [July 7, 2025, 5:44pm UTC](https://forum.babylonjs.com/t/webpack-issue-upgrading-from-babylon-js-6-49-0-to-8-15-1/59394/3 "2025-07-07T17:44:59Z")

</div>

cc @ryantrem as @amoebachant is relaxing on summer break 🙂

---

<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:** [July 7, 2025, 5:45pm UTC](https://forum.babylonjs.com/t/webpack-issue-upgrading-from-babylon-js-6-49-0-to-8-15-1/59394/4 "2025-07-07T17:45:13Z")

</div>

Assigned @ryantrem on July 7, 2025, 5:45pm UTC



---

<div class="post-metadata">

**Author:** ![ryantrem](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/ryantrem/32/34010_2.png) [@ryantrem](https://forum.babylonjs.com/u/ryantrem)\
**Post date:** [July 8, 2025, 3:33pm UTC](https://forum.babylonjs.com/t/webpack-issue-upgrading-from-babylon-js-6-49-0-to-8-15-1/59394/5 "2025-07-08T15:33:08Z")

</div>

It doesn’t look like an issue of missing package references to me, it looks like an issue with code splitting. Since Babylon 6, we have started using dynamic imports (e.g. `await import(...)`) quite a bit, especially around dealing with webgl vs webgpu shaders (so you can download just the shaders for the engine you are using), so to me it looks more related to that. I would guess there is some misconfiguration in your webpack settings related to code splitting.

Can you see if the file vendors-node\_modules\_babylonjs\_core\_Shaders\_ShadersInclude\_bakedVertexAnimation\_js-node\_modul-3ca487.bundle.js (and the other related chunk files) actually exist on disk? Is webpack generating those files and the webpack dev server just can’t resolve them, or is webpack not generating them at all?

---

<div class="post-metadata">

**Author:** ![Michael\_Scherotter1](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/michael_scherotter1/32/16678_2.png) [@Michael\_Scherotter1](https://forum.babylonjs.com/u/Michael_Scherotter1)\
**Post date:** [July 8, 2025, 4:05pm UTC](https://forum.babylonjs.com/t/webpack-issue-upgrading-from-babylon-js-6-49-0-to-8-15-1/59394/6 "2025-07-08T16:05:12Z")

</div>

The bundles exist on disk at  
[https://localhost:8000/js/vendors-node\_modules\_babylonjs\_core\_Shaders\_ShadersInclude\_bakedVertexAnimation\_js-node\_modul-3ca487.bundle.js](https://localhost:8000/js/vendors-node_modules_babylonjs_core_Shaders_ShadersInclude_bakedVertexAnimation_js-node_modul-3ca487.bundle.js)

not at the location it is looking:  
[https://localhost:8000/gallery/7f7bb756-50da-4bae-a0fe-e3b8b5d3e6b2/vendors-node\_modules\_babylonjs\_core\_Shaders\_ShadersInclude\_bakedVertexAnimation\_js-node\_modul-3ca487.bundle.js](https://localhost:8000/gallery/7f7bb756-50da-4bae-a0fe-e3b8b5d3e6b2/vendors-node_modules_babylonjs_core_Shaders_ShadersInclude_bakedVertexAnimation_js-node_modul-3ca487.bundle.js)

the bundle for the page is in [https://localhost:8000/js/](https://localhost:8000/js/) as well.

Should I replace all of the BJS import directives in my code with await import directives?

---

<div class="post-metadata">

**Author:** ![Michael\_Scherotter1](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/michael_scherotter1/32/16678_2.png) [@Michael\_Scherotter1](https://forum.babylonjs.com/u/Michael_Scherotter1)\
**Post date:** [July 8, 2025, 4:40pm UTC](https://forum.babylonjs.com/t/webpack-issue-upgrading-from-babylon-js-6-49-0-to-8-15-1/59394/7 "2025-07-08T16:40:45Z")

</div>

The webpack configuration was the issue.

setting the wepack config output.publicPath to “/js/” fixed it and now BabylonJS 8.15 works!

Thank you so much!  
Michael

---

<div class="post-metadata">

**Author:** ![Michael\_Scherotter1](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/michael_scherotter1/32/16678_2.png) [@Michael\_Scherotter1](https://forum.babylonjs.com/u/Michael_Scherotter1)\
**Post date:** [May 12, 2026, 7:38pm UTC](https://forum.babylonjs.com/t/webpack-issue-upgrading-from-babylon-js-6-49-0-to-8-15-1/59394/8 "2026-05-12T19:38:44Z")

</div>

Upgrading to BJS 9.6.2, the problem came back, where many of the shader packages are emitted to the js directory, just not the bakedVertexAnimation one. Do you have docs on how I should use the await import?

---

<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:** [May 13, 2026, 4:02pm UTC](https://forum.babylonjs.com/t/webpack-issue-upgrading-from-babylon-js-6-49-0-to-8-15-1/59394/9 "2026-05-13T16:02:12Z")

</div>

cc @RaananW as we had some infra changes recently.

---

<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:** [May 13, 2026, 6:49pm UTC](https://forum.babylonjs.com/t/webpack-issue-upgrading-from-babylon-js-6-49-0-to-8-15-1/59394/10 "2026-05-13T18:49:32Z")

</div>

we made no significant changes to the es6 code, so I wonder what happened here. did it work until 9.5, or did you just upgrade from 8 to 9? Is it only this shader?
