# \#treeshaking

**URL:** https://forum.babylonjs.com/tag/treeshaking/335.md

[Latest](https://forum.babylonjs.com/latest.md) · [Categories](https://forum.babylonjs.com/categories.md) · [Tags](https://forum.babylonjs.com/tags.md)

---

## [The tree shaking optimization has failed in @babylonjs/core](https://forum.babylonjs.com/t/the-tree-shaking-optimization-has-failed-in-babylonjs-core/61923)

<div class="topic-metadata">

**Author:** [@RichardFly](https://forum.babylonjs.com/u/RichardFly)\
**Replies:** 7\
**Last updated:** [December 29, 2025, 5:49pm UTC](https://forum.babylonjs.com/t/the-tree-shaking-optimization-has-failed-in-babylonjs-core/61923 "2025-12-29T17:49:11Z")

</div>

Hey, team! I just notice that the tree shaking optimization has failed in @babylonjs/core.I provide a demo below. In this demo, I only import an AnimationGroup and when I build the demo and analyze the dist, I see that a…

---

## [Import issues in Babylon.js 8.28.2](https://forum.babylonjs.com/t/import-issues-in-babylon-js-8-28-2/60857)

<div class="topic-metadata">

**Author:** [@link2twenty](https://forum.babylonjs.com/u/link2twenty)\
**Replies:** 4\
**Last updated:** [October 9, 2025, 4:34pm UTC](https://forum.babylonjs.com/t/import-issues-in-babylon-js-8-28-2/60857 "2025-10-09T16:34:54Z")

</div>

Hey, I’m having some issues with 8.28.2 onwards with animations. when I attempt to play a custom animation group babylonjs crashes (grey screens) but doesn’t give me an error. This only happens when built for production…

---

## [Outline renderer error when tree shaking](https://forum.babylonjs.com/t/outline-renderer-error-when-tree-shaking/60390)

<div class="topic-metadata">

**Author:** [@julien-moreau](https://forum.babylonjs.com/u/julien-moreau)\
**Replies:** 2\
**Last updated:** [September 5, 2025, 12:02pm UTC](https://forum.babylonjs.com/t/outline-renderer-error-when-tree-shaking/60390 "2025-09-05T12:02:44Z")

</div>

Hi ! Hope you are going well! I updated to the latest Babylon.js version (8.26.0) and I’m facing an issue that appears only when babylon is tree shaked. The bug appears in ObjectRenderer trying to set “enabled” value in…

---

## [Treeshaking ShaderWGSL](https://forum.babylonjs.com/t/treeshaking-shaderwgsl/59598)

<div class="topic-metadata">

**Author:** [@link2twenty](https://forum.babylonjs.com/u/link2twenty)\
**Replies:** 2\
**Last updated:** [July 17, 2025, 4:10pm UTC](https://forum.babylonjs.com/t/treeshaking-shaderwgsl/59598 "2025-07-17T16:10:45Z")

</div>

I’m on a bit of treeshaking journey trying to get my bundle size down currently BabylonJS is sitting just over 2000kB (not compressed). While investigating I noticed that materials (pbrBaseMaterial and StandardMaterial …

---

## [Some solved problems while treeshaking](https://forum.babylonjs.com/t/some-solved-problems-while-treeshaking/46329)

<div class="topic-metadata">

**Author:** [@ChirodSummerset](https://forum.babylonjs.com/u/ChirodSummerset)\
**Replies:** 2\
**Last updated:** [December 12, 2023, 1:47am UTC](https://forum.babylonjs.com/t/some-solved-problems-while-treeshaking/46329 "2023-12-12T01:47:49Z")

</div>

Hi. I was trying treeshaking today according to this doc and met some errors in the console. Yet I found ways to solve them. while the doc itself haven’t listed such bugs, here I post them and the solutions here becaus…

---

## [WebGPU not working in vite project](https://forum.babylonjs.com/t/webgpu-not-working-in-vite-project/40519)

<div class="topic-metadata">

**Author:** [@Leon](https://forum.babylonjs.com/u/Leon)\
**Replies:** 3\
**Last updated:** [May 5, 2023, 2:16pm UTC](https://forum.babylonjs.com/t/webgpu-not-working-in-vite-project/40519 "2023-05-05T14:16:46Z")

</div>

Hi! I just wanted to test out webgpu now that it is available in chrome 113. But I ran into problems straight away. I created a new babylon vite project via the create-babylon npm library npm init babylon@latest The…
