I’m using BJS ES6 preview release modules with TypeScript, Babel & Webpack but my builds for this basic, sample scene are still 6.9Mb for bundle.js. With tree shaking I thought I’d be able to get it down under 1Mb so I guess I’ve done something wrong.
Are there any ts, babel or webpack settings I’ve missed?
in 4.0.3 version the import { Vector3 } from "@babylonjs/core/Maths/math.vector"; not working, i use instead import { Vector3 } from "@babylonjs/core/Maths";.
@Deltakosh do you have idea whats wrong?
If I use import { Engine } from '@babylonjs/core/Engines/engine';
instead of import { Engine } from '@babylonjs/core';
or import { Engine } from '@babylonjs/core/Engines';
i got error when building my app:
ERROR in node_modules/@babylonjs/core/Engines/engine.d.ts:8:10 - error TS2305:
Module '".../node_modules/@babylonjs/core/Engines/engine"' has no exported member 'IDisplayChangedEv entArgs'.
8 import { IDisplayChangedEventArgs } from "../Engines/engine";
node_modules/@babylonjs/core/node.d.ts:148:9 - error TS1086: An accessor cannot be declared in an ambient context.
148 set onDispose(callback: () => void);
~~~~~~~~~
node_modules/@babylonjs/core/node.d.ts:185:9 - error TS1086: An accessor cannot be declared in an ambient context.
185 get behaviors(): Behavior<Node>[];
~~~~~~~~~
node_modules/@babylonjs/core/node.d.ts:204:9 - error TS1086: An accessor cannot be declared in an ambient context.
204 get worldMatrixFromCache(): Matrix;
~~~~~~~~~~~~~~~~~~~~
node_modules/@babylonjs/core/scene.d.ts:156:9 - error TS1086: An accessor cannot be declared in an ambient context.
156 get environmentTexture(): Nullable<BaseTexture>;
~~~~~~~~~~~~~~~~~~
node_modules/@babylonjs/core/scene.d.ts:162:9 - error TS1086: An accessor cannot be declared in an ambient context.
162 set environmentTexture(value: Nullable<BaseTexture>);
node_modules/@babylonjs/core/scene.d.ts:984:9 - error TS1086: An accessor cannot be declared in an ambient context.
984 set pointerX(value: number);
~~~~~~~~
node_modules/@babylonjs/core/scene.d.ts:988:9 - error TS1086: An accessor cannot be declared in an ambient context.
988 get pointerY(): number;
~~~~~~~~
node_modules/@babylonjs/core/scene.d.ts:989:9 - error TS1086: An accessor cannot be declared in an ambient context.
989 set pointerY(value: number);
~~~~~~~~
node_modules/@babylonjs/core/scene.d.ts:1027:9 - error TS1086: An accessor cannot be declared in an ambient context.
1027 get totalVerticesPerfCounter(): PerfCounter;
~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@babylonjs/core/scene.d.ts:1037:9 - error TS1086: An accessor cannot be declared in an ambient context.
1037 get totalActiveIndicesPerfCounter(): PerfCounter;
node_modules/@babylonjs/loaders/glTF/glTFFileLoader.d.ts:267:9 - error TS1086: An accessor cannot be declared in an ambient context.
267 get capturePerformanceCounters(): boolean;
~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@babylonjs/loaders/glTF/glTFFileLoader.d.ts:268:9 - error TS1086: An accessor cannot be declared in an ambient context.
268 set capturePerformanceCounters(value: boolean);
~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@babylonjs/loaders/glTF/glTFFileLoader.d.ts:281:9 - error TS1086: An accessor cannot be declared in an ambient context.
281 set onValidated(callback: (results: GLTF2.IGLTFValidationResults) => void);
~~~~~~~~~~~
node_modules/@babylonjs/loaders/glTF/glTFFileLoader.d.ts:326:9 - error TS1086: An accessor cannot be declared in an ambient context.
326 get loaderState(): Nullable<GLTFLoaderState>;
~~~~~~~~~~~