When building with SSR support via Inertia Vite logs the following error:
file:///project/bootstrap/ssr/assets/Show-76caa3ba.mjs:4
import { useVfm, VueFinalModal } from "vue-final-modal";
^^^^^^^^^^^^^
SyntaxError: Named export 'VueFinalModal' not found. The requested module 'vue-final-modal' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from 'vue-final-modal';
const { useVfm, VueFinalModal } = pkg;
at ModuleJob._instantiate (node:internal/modules/esm/module_job:123:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:189:5)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:530:24)
at async j (file:///Users/albin/code/watt-a-day.se/node_modules/@inertiajs/vue3/dist/index.esm.js:1:5861)
at async Server.<anonymous> (file:///Users/albin/code/watt-a-day.se/node_modules/@inertiajs/core/dist/server.esm.js:1:527)
Version
vue-final-modal: ^4.4.5 vue: ^3.2.41
OS
Mac
When building with SSR support via Inertia Vite logs the following error: