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
Implement lib into Laravel 10 with Vite.js #568
Comments
I found a solution (with static call and add type="module" for script tag but no any other solution with npm vite config ?) : <head>
...
<!-- Scripts -->
@vite(['resources/sass/app.scss', 'resources/js/app.js'])
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.4/jquery-confirm.min.css">
<script type="module" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.4/jquery-confirm.min.js"></script>
</head> |
It seems to work if I do like this in my import jConfirm from 'jquery-confirm';
jConfirm();
// additional application code |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
jquery-confirm version:
v3.3.4
I'm submitting a ... (check one with "x")
[ ] bug report
[ ] feature request
[x] support request
Current behavior:
Expected behavior:
Steps to reproduce:
Related code:
resources/js/app.js :
resources/js/_script.js :
Error showing
Uncaught TypeError: $.confirm is not a function
at HTMLButtonElement. (app-d2beca6b.js:60:22976)
at HTMLBodyElement.dispatch (app-d2beca6b.js:39:43768)
at ge.handle (app-d2beca6b.js:39:41705)
Other information:
I dev with Laravel 10 and npm with Vite, how can I use jquery-confirm with this configuration ?
The text was updated successfully, but these errors were encountered: