Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Svelte 4 imports don't return string, return object #1132

Open
2 of 3 tasks
JustinGrote opened this issue Nov 13, 2024 · 0 comments
Open
2 of 3 tasks

[BUG] Svelte 4 imports don't return string, return object #1132

JustinGrote opened this issue Nov 13, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@JustinGrote
Copy link

What happened?

Tried switching from react to svelte, which is stated as supported.

https://github.com/JustinGrote/azure-xray/tree/experiment/svelte

plasmo dev completes successfuly, but:
 
Expected: a string with the resolved path (this is how it worked in React)

Actual: The object is returned, which causes my script to fail with Uncaught TypeError: path?.startsWith is not a function. The typescript types say it's supposed to be a string, so I assume this is a bug in the resolver.

Version

Latest

What OS are you seeing the problem on?

Windows, Linux

What browsers are you seeing the problem on?

Chrome, Microsoft Edge

Relevant log output

<script lang="ts">
import azureXrayPanel from "url:./panels/azure-xray/index.svelte"
import logo from "url:~/assets/icon.png"
import { fixChromePath } from "./util";

chrome.devtools.panels.create(
  "Azure XRay",
  fixChromePath(logo),
  fixChromePath(azureXrayPanel),
)
</script>

<div>
  <h2>
    This is a bootstrapper for devtools panels. It is never displayed directly.
  </h2>
</div>

(OPTIONAL) Contribution

  • I would like to fix this BUG via a PR

Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I checked the current issues for duplicate problems.
@JustinGrote JustinGrote added the bug Something isn't working label Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant