Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Three.js tree-shaking #2006

Closed
pedroalmeida415 opened this issue Jun 25, 2024 · 1 comment
Closed

Support Three.js tree-shaking #2006

pedroalmeida415 opened this issue Jun 25, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@pedroalmeida415
Copy link

Describe the feature you'd like:

Currently, import * as THREE from 'three' is used throughout the project, which always forces the entire Three.js package to be bundled with your app when using Drei.

Suggested implementation:

Replace import * as THREE from 'three' statements with named imports:

-  import * as THREE from 'three';
+  import { dependency1, dependency2, dependency3... } from 'three';
@pedroalmeida415 pedroalmeida415 added the enhancement New feature or request label Jun 25, 2024
@pedroalmeida415
Copy link
Author

The problem was actually in the analyzing tool I was using.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant