inertia
inertia copied to clipboard
SSR dont work
How I can render on client?
Version:
@inertiajs/vue3version: ^1.0.0
Describe the problem:
import require$$0 from "vue";
^^^^^^^^^^
SyntaxError: The requested module 'vue' does not provide an export named 'default'
at ModuleJob._instantiate (node:internal/modules/esm/module_job:122:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:188:5)
file:///public_html/bootstrap/ssr/assets/VueStarRating.common-57a657b1.mjs:1
import require$$0 from "vue";
^^^^^^^^^^
SyntaxError: The requested module 'vue' does not provide an export named 'default'
at ModuleJob._instantiate (node:internal/modules/esm/module_job:122:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:188:5)
client_loop: send disconnect: Broken pipe
Steps to reproduce:
npm install vue-star-rating@next
import StarRating from 'vue-star-rating'
<star-rating />
This is an issue with the package you're trying to import by the looks of it.
vue-star-rating seems to include a default export of vue in its dist files. It's this that's breaking your build since Vue3 doesn't have a default export.
https://github.com/craigh411/vue-star-rating/blob/36f41ef79c928c29411e5240a31750b1e8414501/dist/VueStarRating.common.js#L588