livebud / livebud/bud

Plugins that contain views don't resolve yet

Open
#63 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
JavaScript
Stars
5.6k
Forks
175
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with ssr_test.go:293 and the bud build path that produces bud/view/_ssr.js; inspect how plugin.com's view/index.svelte is resolved versus app.com's view. Update the ESBuild resolver to use the virtual filesystem, then rerun the failing SSR build case and confirm plugin views resolve.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, javascript
Domain
build-system, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.