I'm building a front-end with Webpack that includes threeJs functionality. In the past, I used to NOT include threeJs in my bundle to keep it small (I used the threeJs UMD from a CDN link in my index.html). I did however use the @types/three package for typing.
However, @types/three has now been deprecated. Instead, three now includes its own moduled types. But now, I can't figure out how to use the three package just for its types without also including ALL of the massive threeJs code in my bundle.
Suggestions?
It was initially deprecated, but @types/three is now the place to use again. Moving back to DefinitivelyTyped was done in Jan 2021.
So just add types by running
npm install -D @types/three
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With