-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
After upgrading to Svelte 4, Typescript 5, Vite 5, I'm getting this error:
SyntaxError: [vite] Named export 'Swap' not found. The requested module 'sortablejs' 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 'sortablejs';
const {MultiDrag, Swap} = pkg;
at analyzeImportedModDifference (file:///home/ktecho/PhpstormProjects/xxx/web/frontoffice/node_modules/vite/dist/node/chunks/dep-R0I0XnyH.js:50598:19)
at nodeImport (file:///home/ktecho/PhpstormProjects/xxx/web/frontoffice/node_modules/vite/dist/node/chunks/dep-R0I0XnyH.js:50549:9)
at async ssrImport (file:///home/ktecho/PhpstormProjects/xxx/web/frontoffice/node_modules/vite/dist/node/chunks/dep-R0I0XnyH.js:50444:24)
at async eval (/home/ktecho/PhpstormProjects/xxx/web/frontoffice/node_modules/@jhubbardsf/svelte-sortablejs/SortableList.svelte:5:31)
at async instantiateModule (file:///home/ktecho/PhpstormProjects/xxx/web/frontoffice/node_modules/vite/dist/node/chunks/dep-R0I0XnyH.js:50506:9)
So I guess some small changes are needed in the way that sortablejs
is used?
Metadata
Metadata
Assignees
Labels
No labels