Large app.js file after compling (by webpacks) typescript sources

Hi,
When i compile my typescript files to app.js , i get a huge file. I tried to some options but didn’t get an meaningful reducement. I just use

import * as BABYLON from 'babylonjs';

Any offers about that? Thanks in advance

Lots of them.

But first you will need to provide a bit more information about your build setup :slight_smile:

Are you using the es6 version, or the regular npm (seems to be the default npm package, since you are importing from babylonjs)

What packer are you using, are you minifying, are you importing babylon in other sources? are you importing other babylon packages?

I would recommend starting here - ES6 - Babylon.js Documentation and take it from there

1 Like