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

Plugins that contain views don't resolve yet #63

Open
matthewmueller opened this issue May 17, 2022 · 0 comments
Open

Plugins that contain views don't resolve yet #63

matthewmueller opened this issue May 17, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@matthewmueller
Copy link
Contributor

matthewmueller commented May 17, 2022

Given the following plugin with the module path plugin.com

bud-admin/
  view/
    index.svelte
plugin.go
go.mod

And an application with the following module path app.com, if you run bud build, you'll get the following:

ssr_test.go:293: err: conjure: generate "bud/view/_ssr.js" > ✘ [ERROR] Could not resolve "./view/index.svelte"

svelte:./bud/view/index.svelte:2:28:
	2 │ import ViewIndexSvelte from "./view/index.svelte"
		╵                             ~~~~~~~~~~~~~~~~~~~~~

I assume this error is because ESBuild doesn't yet support virtual file paths, so it's one of the few places in the codebase where we rely on the underlying filesystem. The actual location of the index view is in the plugin.com module's view/ not your app.com's view/.

If that's the case, the ESBuild resolver should be updated to use the virtual filesystem.

@matthewmueller matthewmueller changed the title Plugins that contain views don't work yet Plugins that contain views don't resolve yet May 17, 2022
@matthewmueller matthewmueller added the bug Something isn't working label Jun 29, 2022
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