You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding the line "./src/Button.svelte": "./src/Button.svelte" solved the error temporarily. However, internal references to other components cause similar problems.
It seems like I am missing something. The entry "svelte": "./src/index.js" used to work previously.
Is there something else that is needed to make this work without having to enter every svelte file in the exports section?
If you look at the code shipped to npm there's no component there, just the types...also this exports are wrong because ./src is probably pointing at a directory and exports needs to be files...if you need help setting up the project feel free to join our discord but this is not a bug with svelte. Thanks for reporting tho. 🧡
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
I am getting this error when I use vitest to test a component that depends on a library component.
I have a custom package
@rokkit/ui
that I have published on npm and I am getting this error when importing that custom component in a local component.Example:
This is the exports section of the published library.
src/index.js
contains the codeIn a different project I have created an
AuthButton
component that uses thisButton
In my test file for this
AuthButton.svelte
using vitest I get the errorI changed the import to the following
This gave the error
So i modified the package .json in node_modules with the following updated exports
Adding the line
"./src/Button.svelte": "./src/Button.svelte"
solved the error temporarily. However, internal references to other components cause similar problems.It seems like I am missing something. The entry
"svelte": "./src/index.js"
used to work previously.Is there something else that is needed to make this work without having to enter every svelte file in the exports section?
Reproduction
https://github.com/jerrythomas/repro-svelte-import-error
Logs
System Info
Severity
blocking all usage of svelte
The text was updated successfully, but these errors were encountered: