KyleJune
unsupported lockfile
Delete lock file. I think errors like that happen when switching from DENO_FUTURE being 1 to 0. Your build is running with it as 1, upgrading your lock file, then your other commands are running without it set, and it doesn't recognize or know how to handle the newer lock file format.
10 replies
Deno LSP + React + TypeScript + Vite (--node-modules-dir)
If you want to use esbuild but not my framework, check my frameworks build.ts file to see the options to use for esbuild. You need to use the esbuild deno loader for esbuild to work well with deno. I think the platform and format options are needed too.
22 replies
Deno LSP + React + TypeScript + Vite (--node-modules-dir)
The react.d.ts file for getting types to work in deno feels kinda awkward, wish we had something more like node where you can just include the types in your configuration file like you can with package.json
22 replies
Deno LSP + React + TypeScript + Vite (--node-modules-dir)
I don't use vite, I use esbuild instead. I have no issues with using react, even have SSR working. Here is an example including a react.d.ts file, you could copy that into your own project.
https://github.com/udibo/react-app-example
Here is the framework I wrote that the example is using. I'm still working on writing the guides for it.
https://github.com/udibo/react-app
22 replies
@deno/emit's transpile with JSR
Just create a getBuild function and have it generate the build files to memory. I believe there is a esbuild configuration option for that, which fresh used. Then if a request comes in for one of them, have it wait until the build files were generated by esbuild before responding to requests for the build files. If someone connects before the build finishes, they will just have a longer request time.
14 replies
@deno/emit's transpile with JSR
Yea I know how you could but I don't think you understand, "no build" still had to build your app, you just didn't get to see it happening. It happened everytime you start your server. "no build" was more like "build included" since it built the app on every run instead of only when needed.
14 replies
@deno/emit's transpile with JSR
App is slower without a build step. That's because each time the process restarts, it needs to regenerate the build before it can start handling requests for the build artifacts. The documentation says you can make the server command automatically restart itself by adding the --watch flag. The app would still need to be rebuilt for changes. Before it was just hidden because it would generate the build internally when the build files are requested. It's still being built with esbuild. Cold process startups are now quicker because of the build step not needing to run every time.
14 replies