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

Convert to JavaScript #80

Open
Rich-Harris opened this issue Oct 10, 2024 · 3 comments
Open

Convert to JavaScript #80

Rich-Harris opened this issue Oct 10, 2024 · 3 comments

Comments

@Rich-Harris
Copy link
Member

The first thing I experience when I clone this repo and try to install dependencies is this:

image

IIUC what this is telling me is that I can't install anything because pnpm tries to link up the executables as part of the installation process, but it can't do that because the executable hasn't been built. I can't build the executable because I haven't installed dependencies.

I'm sure this is fixable and if I bash my head against a wall for a couple of minutes I'll figure it out, but: we don't have to live this way. Svelte and SvelteKit are written in JS and don't have a build step (beyond generating .d.ts files during prepublish, or bundling the compiler for the playground in Svelte's case), and aside from avoiding this sort of headache it's been a real productivity win — I don't need to mess around with file watchers during dev, I don't need to deal with sourcemap flakiness or any of that nonsense, I can just pnpm link and I'm good to go. I can even make changes to this package inside another project's node_modules, and once I've done whatever I needed to do the changes are sitting there waiting for me to commit them — no more editing transpiled files and then painstakingly reapplying them to the source they were transpiled from.

Not something we need to act on immediately, but I promise future us will thank us for making this change

@Rich-Harris
Copy link
Member Author

Ah, I see I need to run pnpm build in the root. Took me a while to figure that out

@dummdidumm
Copy link
Member

Let's see how big of the problem this really becomes and take note of examples in this thread over time to properly assess.

@benmccann
Copy link
Member

The build step is pretty annoying during development. I'd be curious to test out --experimental-strip-types, but too much to do before the deadline to try anything at the moment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants