svelte-portal icon indicating copy to clipboard operation
svelte-portal copied to clipboard

Changes in 2.2.1 caused import error when following the old documentation

Open FreekyMage opened this issue 1 year ago • 2 comments

The latest update should probably not have been a patch version bump. We were using import Portal from "svelte-portal/src/Portal.svelte"; like the documentation suggested. This caused builds to fail with this new version, even in projects that didn't directly import it. A patch gets applied even with a simple install command if you're using the widely accepted ^ for your versions. In our case this was ^2.2.0.

Now the version can't be changed anymore, but the documentation should be updated to not show broken code.

FreekyMage avatar Jan 22 '24 16:01 FreekyMage

Error: Missing "./src/Portal.svelte" specifier in "svelte-portal" package

Is this the same issue? Is there a workaround?

EDIT: workaround/fix is to import Portal this way: import Portal from "svelte-portal";

Renkas avatar Feb 24 '24 12:02 Renkas

Not sure if we had the exact same error, but your edit is the fix, just like how it is in the top part of the documentation.

FreekyMage avatar Feb 26 '24 01:02 FreekyMage