Please rationalize dependencies across packages and keep them aligned. #642
Replies: 3 comments
-
Hi @stefanobartoletti, thanks for reporting this and for the thoughtful discussion. It’s always valuable to hear user experiences and suggestions. Regarding the ecosystem setup, each repository treats several dependencies as peer dependencies, which are then optimized using Vite during the build process. For instance, you can see our approach in our Vite configuration here: Lines 74 to 89 in 456f997 This ensures that even if different local versions of Vue or Three.js are used, a consistent version is maintained during the build. We also ensure that Regarding the suggestion to include This strategy is crucial for maintaining the flexibility and performance of applications built with TresJS. We will continue to monitor this setup and consider user feedback for future updates. I agree we should try as much as possible to maintain the dependencies across the ecosystem with the same versioning, but since different teams are working on the packages we opted to use vite Regarding nuxt. The Nuxt module has two major features
We have this issue constantly between Nuxt and the core, with cientos as well, last new version of Nuxt the main loop Regarding your issue with Levioso and MouseParallax, are you importing them manually or relying on the autoimport of the module? Di you try on If still doesn't work lets open a ticket on the nuxt package with your system info an a reproduction so I can take a look to it 💚 |
Beta Was this translation helpful? Give feedback.
-
Hi @stefanobartoletti I just saw that you opened a ticket already here that was closed Tresjs/cientos#369 I just downloaded the code on https://github.com/stefanobartoletti/tresjs-playground and run Screen.Recording.2024-04-15.at.18.56.12.mov |
Beta Was this translation helpful? Give feedback.
-
Hey @alvarosabu thanks for the detailed answer 🙏🏻 Now I understand a little better the overall setup, and probably the issue is with my current implementation. I'm not really sure anyway, as in my public playground, the one that you also linked in your previous answer, everything is working fine. I had these problems with another project whose code is not public, but it has many more modules loaded, so I think that my best option is to start from scratch and add one thing at a time and see when things break. I will see to do this as soon as I gather the required time :D |
Beta Was this translation helpful? Give feedback.
-
Hi everyone, I'm reporting something that looks a bit strange to me, but that may or may not be an issue in a general sense.
First of all, I'm using Tres by including it in my Nuxt project with the provided
@tresjs/nuxt
module (latest published version)I started to notice some odd behavior some time ago, I'm experiencing a strange little problem that is preventing
Levioso
andMouseParallax
(from thecientos
package) to work in the development environment, while they still work in the built site in SSR mode. I already described it here, but I was not able to provide more info as no console errors were logged, so I was left in the pure speculation field: Tresjs/cientos#369Now I noticed that after upgrading typescript in my project from
5.4.3
to5.4.5
, bothLevioso
andMouseParallax
are broken also in the built production site, just like in the development. I'm not sure what is happening under the hood.I tried to delve a little more in the dependencies, and noticed that there is something that looks odd in the versioning of the packages provided by TresJS.
TresJS core has the following versions:
Tres Cientos has
and Tres Nuxt has
and since all of them require
three
as a peer dependency, that I had to manually install on my project, I have this:I'm not really sure of the inner workings of all TresJS packages (maybe this is not related to my issues), but it seems to me that these mismatches have indeed some effect, especially since I noticed some worsening when trying to upgrade typescript.
I would suggest keeping dependencies in these three (excuse the pun!) packages aligned to the same version, and maybe keep also
@types/three
aligned with the basethree
. Also, if this is possible, I would also suggest includingthree
as a direct dependency of TresJS core instead of placing it as a peerDep, to ensure that the end user is not accidentally installing and using a different version than the one used internally by Tres (it may happen if a new Three version is released after the latest Tres).I hope that this does not sound like a nuisance, I understand that maintaining a project like this is not easy. I just wanted to report my experience and try to give some insight into what I thought could be possible causes and solutions. Thanks for all the work that is being done here 💚
Beta Was this translation helpful? Give feedback.
All reactions