How to use jQuery UI with vite in laravel 9 #9415
Replies: 8 comments 10 replies
-
Something like this should work, but it doesn't.
This should probably be a bug report so it can get fixed. |
Beta Was this translation helpful? Give feedback.
-
Hey, I'm facing the same problem, anyone found a solution ? |
Beta Was this translation helpful? Give feedback.
-
Is there any solution available, please? |
Beta Was this translation helpful? Give feedback.
-
See jquery/jquery-ui#2123 (comment) Not really a solution, but I ended up moving away from jQuery UI. SortableJS helped with this. |
Beta Was this translation helpful? Give feedback.
-
I have a solution!
The problem is that the jquery-ui import happens before the assignment. Using this syntax, we ensure that doesn't happen. |
Beta Was this translation helpful? Give feedback.
-
Give this a try: |
Beta Was this translation helpful? Give feedback.
-
This working for me:
Additionally,you can use jQuery-UI Download Builder to get a custom jQuery-UI. |
Beta Was this translation helpful? Give feedback.
-
I came across this issue while looking for a solution. For reference, I use react with vite, not laravel.
Other than that, we haven't set anything in package.json or vite.config.ts. |
Beta Was this translation helpful? Give feedback.
-
I am learning vite and struck with including jquery-ui into the project.
libs.ts
main.ts
console output
vite.config.js
package.json
Beta Was this translation helpful? Give feedback.
All reactions