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

SSR on Multiselect 3.0.0 import problem #1787

Open
am54ful opened this issue Aug 15, 2024 · 1 comment
Open

SSR on Multiselect 3.0.0 import problem #1787

am54ful opened this issue Aug 15, 2024 · 1 comment

Comments

@am54ful
Copy link

am54ful commented Aug 15, 2024

I'm running Vue-Multiselect 3.0.0 on Laravel 11. I simply using the basic syntax on documentation (copy and paste). I'm using Laravel inertia 1.2.0 on npm package and inertiajs/inertia-laravel on composer php also using node version 20.12.2. The problem is on SSR, it showed

SyntaxError: Cannot use import statement outside a module.

If I'm not turning on the SSR mode, it just went fine. Perhaps this is a bug because it is said to have SSR support officially.
I expected no errors to happened, I noticed it like 2 weeks after production when migrating the app. Here's the picture for reference. I confirm problem is within the package as I removed some of the usage in my vue files, it just went gone. Just not sure how to repair.

Update:
As I try to fix the issue, I update the file from vue-multiselect.esm.js to vue-multiselect.esm.mjs as well in its package.json file and it work as temporary solution.

Screenshot 2024-08-15 095535

@mattelen
Copy link
Collaborator

Can you provide an example of the fault in a repo to we can try and reproduce this?

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

No branches or pull requests

2 participants