space-truckers icon indicating copy to clipboard operation
space-truckers copied to clipboard

Import statements not structured for efficient tree-shaking

Open jelster opened this issue 4 years ago • 0 comments

Auto-imports don't structure the content to take advantage of BJS's ES6 module structure. An ESLint rule, GH workflow job, etc would be ideal for this

Bad: import { AdvancedDynamicTexture, Rectangle, Image, Button, Style, StackPanel, Control, TextBlock } from "@babylonjs/gui";

Good: import { StandardMaterial } from "@babylonjs/core/Materials/standardMaterial" import { PBRMaterial } from "@babylonjs/core/Materials/pbrMaterial"

jelster avatar Feb 17 '21 04:02 jelster