deno_std
deno_std copied to clipboard
compat: tracking issue for Vite
This issue tracks the issues for executing basic example of vite in compat mode
A typical workflow we try to support is:
yarn create vite
cd vite-project
yarn
yarn dev
With deno compat mode warpper script (the script should be named node and in your $PATH):
#!/bin/sh
DENO_NODE_COMPAT_URL=file:///path/to/your/deno_std/ deno run --no-check --unstable --compat -A $@
(DENO_NODE_COMPAT_URL=... part is optional)
- [x]
Not implemented: ChildProcess.unref()used in esbuild - [x]
Not implemented: ChildProcess.ref()used in esbuild - [x]
Internal server error: require$$0$5.URLSearchParams is not a constructorthrown in dev server runtime #2056 - [x]
Internal server error: fs__namespace.createReadStream is not a functionthrown in dev server runtime #1435 - [ ] 'upgrade' event is not implemented on http.Server
- used here https://github.com/vitejs/vite/blob/c7fc7c34029f109bb716c6a2888022b2f4c40e3d/packages/vite/src/node/server/ws.ts#L39
- https://github.com/denoland/deno_std/issues/2061
- [x] process.stdout.clearLine is not a function
- [x] https://github.com/denoland/deno_std/issues/2494
Tentative implementation of ReadStream: https://github.com/denoland/deno_std/pull/1435
Is this issue still relevant since the --compat flag has been removed? Vite support is more or less here (minus the need for the node_modules folder, rollup seems blocked on that) from what I've seen from community projects
Let's close this as the basic features of vite work now via npm: specifier.
ref: https://www.youtube.com/watch?v=Zjojo9wdvmY
Is this issue still relevant since the --compat flag has been removed?
npm module compatibility issues are still relevant. Please replace --compat part with npm: specifier when reading them. --compat and npm: uses the same underlying API shims (which is std/node). So many issues should apply for both.