wobsoriano / vue-wrap-balancer

Simple Vue Component That Makes Titles More Readable.
https://vue-wrap-balancer.vercel.app
MIT License
111 stars 1 forks source link

Nuxt 2 & Vue 2 support #2

Closed Elliot67 closed 1 year ago

Elliot67 commented 1 year ago

Since the library is using vue-demi, I guess it should be compatible with Nuxt 2 & Vue 2 but I can't get it to work. Is it compatible ? If yes how do you import it ?

Thx for making the port to Vue ! 💚

wobsoriano commented 1 year ago

Hey, I have not tried it but I expect it to work as long as you have composition-api plugin or vue 2.7 installed?

Elliot67 commented 1 year ago

Tried with composition-api and with vue 2.7. Made a reproduction on stackblitz with the latest nuxt 2 version which includes Vue 2.7. I'm not extremely familiar with Nuxt, the problem might come from me.

wobsoriano commented 1 year ago

Okay, I will have to do some updates since Vue 2 doesn't have withDirectives function.

wobsoriano commented 1 year ago

As stated here, functions like withDirectives isn't available in Vue 2 so I published a different package in this branch instead:

npm install vue2-wrap-balancer

Here's the forked repro btw - stackblitz

Elliot67 commented 1 year ago

Works perfectly, thx!