Tree Shaking scene loader problem
See original GitHub issueWhen importing SceneLoader
directly from import { SceneLoader } from '@babylonjs/core/Loading/sceneLoader';
an exception is thrown:
TypeError: Cannot read property 'plugin' of undefined
at Function.SceneLoader._loadData (sceneLoader.ts:364)
at Function.SceneLoader.ImportMesh (sceneLoader.ts:602)
at sceneLoader.ts:644
at new Promise (<anonymous>)
at Function.SceneLoader.ImportMeshAsync (sceneLoader.ts:643)
at AssetsManager._callee$ (assetsManager.ts:5)
at tryCatch (runtime.js:62)
at Generator.invoke [as _invoke] (runtime.js:288)
// ...
importing SceneLoader
like import { SceneLoader } from '@babylonjs/core/Loading';
fix the problem.
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
Error when using Parcel with tree shaking - Questions
So I enabled tree shaking on ParcelJS, and I got this error when opening the .html ... import { Scene } from “@babylonjs/core/scene”;...
Read more >Tree Shaking with webpack 3 doesn't work
I just upgraded webpack in my react project from version 1 to the latest (3.5.5). I followed the migration guide and there were...
Read more >Tree Shaking
Clarifying tree shaking and sideEffects. The sideEffects and usedExports (more known as tree shaking) optimizations are two different things. sideEffects is ...
Read more >Tree Shaking Three.js - Questions
Hello! I'm building a web app with Three.js. Our main focus is instance loading on the first visit of the user, therefore I...
Read more >Code-Splitting
This ensures that tree shaking keeps working and that you don't pull in unused components. // ManyComponents.js export const MyComponent = /* ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
O.K changed to:
Thanks again.
ok perfect thanks: https://github.com/BabylonJS/Babylon.js/pull/5761/files#diff-ec57518e0799212a83c8752a69d717a5R372