Define component from string
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- JavaScript
- Stars
- 1.4k
- Forks
- 46
- Avg merge
- 10m
- Merged PRs (30d)
- 2
Description
Right now, WebC accepts file paths for component definitions and reads the file during compilation. It would be nice to have a way to pass the component source code directly as a string instead.
webc.defineComponent("my-component", "my-component.webc", "Hello <slot></slot>!")
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the webc.defineComponent entry point and trace how component definitions are currently read during compilation. Implement support for the shown source-string argument while preserving file-path definitions, then verify that both forms compile with the expected component output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api, web-dev
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100