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

Please update to import @hotwired/stimulus instead of stimulus #104

Closed
mattes3 opened this issue Aug 20, 2022 · 5 comments · Fixed by #116
Closed

Please update to import @hotwired/stimulus instead of stimulus #104

mattes3 opened this issue Aug 20, 2022 · 5 comments · Fixed by #116

Comments

@mattes3
Copy link

mattes3 commented Aug 20, 2022

Hi, I wanted to use this library. However, it is compiled against a module called 'stimulus'. I compile against '@hotwired/stimulus'. Could you please update and use the new Stimulus package?

Thanks a lot!

@robbevp
Copy link
Owner

robbevp commented Sep 11, 2022

Hi @mattes3 ,

Sorry for the late reply - I was rather busy with some other projects.
Because of the naming change from stimulus to @hotwired/stimulus, there is no good way for me to keep support for both stimulus 2 and 3 at the same time. Note that the stimulus package does little more than repackage @hotwired/stimulus, so there should be little issue adding stimulus as a dependency to your project.

You could also add do the following in your package.json dependencies:

"stimulus": "npm:@hotwired/[email protected]"

@davidjr82
Copy link

I think it make sense to stay close to the actual stimulus version. Why not create a branch for v2 and set the default for the latest stimulus version (v3 at the moment)? Just my two cents. In my case, I just copy/paste the controller within my project to use it.

Thanks!

@Petercopter
Copy link

This library is fantastic, thanks so much. I'm using it to implement the transitions from Tailwind UI.

I wasn't able to get it work until I read this issue, it would be great if it got updated to use @hotwired/stimulus, that was really confusing!

@robbevp
Copy link
Owner

robbevp commented Feb 5, 2023

I've added a note to the readme, so it easier to discover the solution for this.

As mentioned earlier, I want to keep support for stimulus 2.x until their is a technical reason not to do this. It does not make sense to me to have two versions of such a simple package as this one - simply because of another package that changed it name.

@alec-c4
Copy link

alec-c4 commented Feb 28, 2023

Hey!
Thanks a lot for your library, but I'd like to propose how to manage support for both stimulus 2 and 3
1 - you can create separate branches in your git repo, master/main will point to 3.x version, but branch named 2.x will point to 2.x version
2 - you can create versions in npm catalog, I mean stimulus-transition@2 will support stimulus 2.x, but stimulus-transition@latest will support stimulus 3.x

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

Successfully merging a pull request may close this issue.

5 participants