feat: Make `@sveltejs/sv-utils` browser-friendly
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 506
- Forks
- 107
- Avg merge
- 5d 15h
- Merged PRs (30d)
- 28
Description
I would like to reuse the same logic based on @sveltejs/sv-utils both in the implementation of an addon and in factories that generate files for sandbox environments directly in the browser.
Currently, this is not possible because the Node.js version of the yaml dependency is bundled. As a result, the generated bundle contains the following import:
import { createRequire } from "node:module";
Would it be possible to use a browser-compatible version/build of yaml instead, so that @sveltejs/sv-utils can also be used in browser environments?
Contributor guide
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 by locating the @sveltejs/sv-utils package configuration and its yaml dependency or bundling setup. Check how the browser bundle is generated, then verify that the resulting bundle no longer imports node:module and can be used in a browser environment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, yaml
- Domain
- tooling, web-dev
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 62/100