KyleJune
KyleJune
DDeno
Created by Kojo.gg on 2/27/2024 in #help
Deno LSP + React + TypeScript + Vite (--node-modules-dir)
Could you show what you mean about react-dom? I only did react but will do that too if it's needed.
22 replies
DDeno
Created by kinghat on 9/6/2024 in #help
unsupported lockfile
Either run all commands with it set to 1 or run all with it set to 0. Or disable lock files.
10 replies
DDeno
Created by kinghat on 9/6/2024 in #help
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
DDeno
Created by Kojo.gg on 2/27/2024 in #help
Deno LSP + React + TypeScript + Vite (--node-modules-dir)
React testing library also works now. A while ago it didn't but I think they fixed the issues in the node compatibility layer over this past year.
22 replies
DDeno
Created by Kojo.gg on 2/27/2024 in #help
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
DDeno
Created by Kojo.gg on 2/27/2024 in #help
Deno LSP + React + TypeScript + Vite (--node-modules-dir)
Also look at my deno.jsonc for correct compiler options for react.
22 replies
DDeno
Created by Kojo.gg on 2/27/2024 in #help
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
DDeno
Created by Kojo.gg on 2/27/2024 in #help
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
DDeno
Created by Kojo.gg on 2/27/2024 in #help
Deno LSP + React + TypeScript + Vite (--node-modules-dir)
To get react types to work you can create a react.d.ts file.
22 replies
DDeno
Created by Kojo.gg on 8/30/2024 in #help
@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
DDeno
Created by Kojo.gg on 8/30/2024 in #help
@deno/emit's transpile with JSR
Now it creates the files instead of building them and keeping them in ram.
14 replies
DDeno
Created by Kojo.gg on 8/30/2024 in #help
@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
DDeno
Created by Kojo.gg on 8/30/2024 in #help
@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
DDeno
Created by Kojo.gg on 8/30/2024 in #help
@deno/emit's transpile with JSR
idk what you mean by on the fly like fresh used to be. What is different about it now?
14 replies
DDeno
Created by Kojo.gg on 8/30/2024 in #help
@deno/emit's transpile with JSR
I'd recommend esbuild with the deno plugin. That is what fresh uses to bundle/transpile preact in their fresh framework. I've been able to use esbuild for react too without issue importing from jsr.
14 replies
DDeno
Created by KyleJune on 5/1/2024 in #help
react-helmet-async missing HelmetProvider export
I'll just tell users to import Helmet from my module that will re-export it so that it's easier for them to use in their builds.
15 replies
DDeno
Created by KyleJune on 5/1/2024 in #help
react-helmet-async missing HelmetProvider export
import * as reactHelmetAsync from "react-helmet-async";
const reactHelmetAsyncFixed = reactHelmetAsync;
const { HelmetProvider, Helmet } = reactHelmetAsyncFixed.default ??
reactHelmetAsync;
import * as reactHelmetAsync from "react-helmet-async";
const reactHelmetAsyncFixed = reactHelmetAsync;
const { HelmetProvider, Helmet } = reactHelmetAsyncFixed.default ??
reactHelmetAsync;
esbuild warns if I do reactHelmetAsync.default, doesn't if I do reactHelmetAsyncFixed.default.
15 replies
DDeno
Created by KyleJune on 5/1/2024 in #help
react-helmet-async missing HelmetProvider export
I found a workaround for the esbuild warning.
15 replies
DDeno
Created by KyleJune on 5/1/2024 in #help
react-helmet-async missing HelmetProvider export
Basically if I build for the browser with esm, default is undefined. If I do a neutral build, npm specifiers don't work. Seems like I won't be able to workaround this warning.
15 replies
DDeno
Created by KyleJune on 5/1/2024 in #help
react-helmet-async missing HelmetProvider export
discord shows screenshots poorly, but if you click on them you can see the full screenshots.
15 replies