# \#es6

**URL:** https://forum.babylonjs.com/tag/es6/269.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…

---

## [Treeshaking but bundle still over 5MB](https://forum.babylonjs.com/t/treeshaking-but-bundle-still-over-5mb/44370)

<div class="topic-metadata">

**Author:** [@Simon\_Weck](https://forum.babylonjs.com/u/Simon_Weck)\
**Replies:** 10\
**Last updated:** [July 17, 2025, 12:25pm UTC](https://forum.babylonjs.com/t/treeshaking-but-bundle-still-over-5mb/44370 "2025-07-17T12:25:45Z")

</div>

Hey there, im trying to treeshake babylonjs but it looks like the bundle is still really big with a size of 5.59 MB. Its a Vue3 + Vite Application and Babylonjs is responsible for 91% (5.13MB) of the bundlesize. Is this…

---

## [Babylon.JS & TypeScript - Inherited members not visible on derived classes?](https://forum.babylonjs.com/t/babylon-js-typescript-inherited-members-not-visible-on-derived-classes/58206)

<div class="topic-metadata">

**Author:** [@SteffanDonal](https://forum.babylonjs.com/u/SteffanDonal)\
**Replies:** 7\
**Last updated:** [May 2, 2025, 11:47am UTC](https://forum.babylonjs.com/t/babylon-js-typescript-inherited-members-not-visible-on-derived-classes/58206 "2025-05-02T11:47:16Z")

</div>

Hello, thanks for popping in to help. Context: I’ve just started using Babylon.JS with TypeScript. I’m reasonably comfortable with TypeScript syntax and expectations, but there’s a solid chance I’m missing something si…

---

## [Babylon development: ES version, Typescript version, in-file documentation format?](https://forum.babylonjs.com/t/babylon-development-es-version-typescript-version-in-file-documentation-format/53928)

<div class="topic-metadata">

**Author:** [@HiGreg](https://forum.babylonjs.com/u/HiGreg)\
**Replies:** 2\
**Last updated:** [October 5, 2024, 1:01am UTC](https://forum.babylonjs.com/t/babylon-development-es-version-typescript-version-in-file-documentation-format/53928 "2024-10-05T01:01:59Z")

</div>

Which runtime environment should I target? Is ES2022 supported by Babylon source code, build tools, and developers? Do I need to target only ES6? Eventually, I’ll convert to TypeScript. What TypeScript version is used? …

---

## [Build:es6 broken under windows 11 (Engines/constants.js)](https://forum.babylonjs.com/t/build-es6-broken-under-windows-11-engines-constants-js/53303)

<div class="topic-metadata">

**Author:** [@forux](https://forum.babylonjs.com/u/forux)\
**Replies:** 3\
**Last updated:** [September 9, 2024, 3:21pm UTC](https://forum.babylonjs.com/t/build-es6-broken-under-windows-11-engines-constants-js/53303 "2024-09-09T15:21:52Z")

</div>

The result of the build is below on screenshoot. It was built from sources attached to the 7.24.0 tag (Release 7.24.0 · BabylonJS/Babylon.js · GitHub) So Engines/constants.js broken for now if building under windows 11,…

---

## [CharacterController with @babylonjs/core](https://forum.babylonjs.com/t/charactercontroller-with-babylonjs-core/48009)

<div class="topic-metadata">

**Author:** [@Boz](https://forum.babylonjs.com/u/Boz)\
**Replies:** 8\
**Last updated:** [March 13, 2024, 12:43pm UTC](https://forum.babylonjs.com/t/charactercontroller-with-babylonjs-core/48009 "2024-03-13T12:43:20Z")

</div>

Hello ! I am back to BabylonJS after a year or two out, the new version looks promising :smiley: I just setup my project with a 3d model and I want to use the Character Controller library from @satguru which is doing e…

---

## [beginDirectAnimation doesn't exist](https://forum.babylonjs.com/t/begindirectanimation-doesnt-exist/51466)

<div class="topic-metadata">

**Author:** [@leo\_h](https://forum.babylonjs.com/u/leo_h)\
**Replies:** 17\
**Last updated:** [June 20, 2024, 9:49am UTC](https://forum.babylonjs.com/t/begindirectanimation-doesnt-exist/51466 "2024-06-20T09:49:42Z")

</div>

Having previously used with BabylonViewer this function I’ve seen recommended multiple times: BabylonViewer.BABYLON.ArcRotateCamera.prototype.spinTo = function (whichprop, targetval, speed) { var ease = new BabylonV…

---

## [Incorrect or Inconsistent Typescript Definitions](https://forum.babylonjs.com/t/incorrect-or-inconsistent-typescript-definitions/43150)

<div class="topic-metadata">

**Author:** [@mystery-e204](https://forum.babylonjs.com/u/mystery-e204)\
**Replies:** 4\
**Last updated:** [August 10, 2023, 9:31am UTC](https://forum.babylonjs.com/t/incorrect-or-inconsistent-typescript-definitions/43150 "2023-08-10T09:31:00Z")

</div>

Hi, I’m using babylon 6 with typescript in vscode (es6). The problem also appears on the playground. The problem at hand is the MeshBuilder.CreateLineSystem method that accepts as its final argument a Scene instance. I…

---

## [ES6 Sourcemaps not lining up since 5.27.1](https://forum.babylonjs.com/t/es6-sourcemaps-not-lining-up-since-5-27-1/43021)

<div class="topic-metadata">

**Author:** [@rohmori](https://forum.babylonjs.com/u/rohmori)\
**Replies:** 7\
**Last updated:** [August 7, 2023, 2:41pm UTC](https://forum.babylonjs.com/t/es6-sourcemaps-not-lining-up-since-5-27-1/43021 "2023-08-07T14:41:57Z")

</div>

Hi there, I was just wondering if anyone else has been running into this issue with Babylon.js recently. We are using Babylon.js 5.57 (also tested with 6.14) on our project, and are using Rollup to bundle our files. We …

---

## [Es6 Havok display physics bodies grid abnormal](https://forum.babylonjs.com/t/es6-havok-display-physics-bodies-grid-abnormal/41903)

<div class="topic-metadata">

**Author:** [@pxim](https://forum.babylonjs.com/u/pxim)\
**Replies:** 10\
**Last updated:** [June 28, 2023, 9:06am UTC](https://forum.babylonjs.com/t/es6-havok-display-physics-bodies-grid-abnormal/41903 "2023-06-28T09:06:00Z")

</div>

example: Babylon.js Playground (babylonjs.com) In Playground online cases, the Physics Bodies grid display is normal. But in my local development environment, I use ES6 to introduce the BABYLON library to get it. Th…

---

## [Gamepad events not triggering](https://forum.babylonjs.com/t/gamepad-events-not-triggering/40362)

<div class="topic-metadata">

**Author:** [@CiderPunk](https://forum.babylonjs.com/u/CiderPunk)\
**Replies:** 8\
**Last updated:** [May 3, 2023, 4:34pm UTC](https://forum.babylonjs.com/t/gamepad-events-not-triggering/40362 "2023-05-03T16:34:52Z")

</div>

Hi all Long shot here, I’m trying to make a ludum dare game and after a blazing first 2 hours i’ve now spent 3 hours trying to get any kind of input from a gamepad, here’s my input manager, I get console log messages fo…

---

## [Broken link in the doc](https://forum.babylonjs.com/t/broken-link-in-the-doc/38311)

<div class="topic-metadata">

**Author:** [@Dok11](https://forum.babylonjs.com/u/Dok11)\
**Replies:** 6\
**Last updated:** [February 21, 2023, 5:57pm UTC](https://forum.babylonjs.com/t/broken-link-in-the-doc/38311 "2023-02-21T17:57:29Z")

</div>

The “ES6 dedicated documentation” navigates to 404. And in the search result most relevant link are not first:

---

## [ES6 Redundant Imports](https://forum.babylonjs.com/t/es6-redundant-imports/37326)

<div class="topic-metadata">

**Author:** [@Takemura](https://forum.babylonjs.com/u/Takemura)\
**Replies:** 2\
**Last updated:** [January 13, 2023, 9:23am UTC](https://forum.babylonjs.com/t/es6-redundant-imports/37326 "2023-01-13T09:23:50Z")

</div>

Hello all, I wanted to reorganise my project and now I wonder which would be the correct approach. Lets say you have a classes Game, Database, Menu etc. Currently I do import constants.js (inherits game measures like …

---

## [ES6 loaders support for non-node environment](https://forum.babylonjs.com/t/es6-loaders-support-for-non-node-environment/37103)

<div class="topic-metadata">

**Author:** [@Vortex](https://forum.babylonjs.com/u/Vortex)\
**Replies:** 9\
**Last updated:** [January 5, 2023, 3:16pm UTC](https://forum.babylonjs.com/t/es6-loaders-support-for-non-node-environment/37103 "2023-01-05T15:16:07Z")

</div>

I’m trying to get a front-end project working with es6 modules (see this thread). Unfortunately, I can’t get it to work since the loaders are using imports like this: import { Example } from '@babylonjs/core/...' Which…
