TS ES6 module imports: how to quickly find module to import?

Likely a silly question and not Babylon.js specific but I’m trying to maximise ES6 tree shaking by only importing the modules I need, but I’m struggling sometimes to find the location of specific modules. Most of the time I can search the Babylon.js codebase and create my import when I find what I’m looking for but some things are hard to find quickly in a codebase the size of Babylon.

There’s got to be an easier/quicker way right?

Most IDEs will auto-import classes they find, or at least offer suggestions. What code editor are you using?

@RaananW I’m using vscode. It could be something to do with my webpack babel tsconfig setup.

Make sure this is enabled:

and maybe try:

https://marketplace.visualstudio.com/items?itemName=pmneo.tsimporter

Might be a configuration issue, I hope you manage to get it to work correctly :slight_smile:

3 Likes

Thanks that did the trick.

1 Like