@Mike Nomitch can you guys create a
@Mike Nomitch | Workers PM can you guys create a containers-help and a bugs channel?
10 Replies
Hey, so I want to keep things in here for now. - If in a couple weeks it stays very debugging-heavy, we can think about spinning it off, but I don't want to split off prematurely if we dont need to.
Just want to funnel people to one place for now, so we get as much feedback as possible.
got it i'm just noticing alot of showcase mixxed with a lot of bugs vs a lot of nice to haves
Yeah, I want us to feel the pain of the bugs so we make sure to fix them 😅
masochist
But yeah the showcase is lost in the noise a big which is sad
But we just gotta do our part to iron things out
hey man i do have a question pet peeve i was wondering the cloudflare module specifier imports messes with alot of full stack stuff.
is there anyway going forward you will be able to allow us to define durableobjects or basically anything that exports from a cloudflare: outside of the default handler
basically because of the way people have built out prerendering.
Hmm can you give example of this?
like code-wise
just so I can visualize
sure. let me just give you the problem bc i'm not sure what you would need to see.
if i enable pre-rendering in anything vite based - react-router , tanstack , waku... what its doing is its importing the default module in the build process. so node is effectively haveing to resolve a cloudflare:* the one thing you can't dynamic import is a class and wrangler requires that you export the durable object class in the main what i'm asking is that you can specify another module in the wrangler config to export in the DO so do you want to see what i would like the wrangler file to look like? or do you want me to give you a repo that blows up cloudflare/vite-plugin "fixes" it by blocking you from prerendering lol i'm working around it going forward with nodejs module import loaders that will give dummy cloudflare objects i looked at the code for wrangler i'm not sure that there's a reason it wouldn't work but i maybe misunderstanding env binding works when you call the main.
if i enable pre-rendering in anything vite based - react-router , tanstack , waku... what its doing is its importing the default module in the build process. so node is effectively haveing to resolve a cloudflare:* the one thing you can't dynamic import is a class and wrangler requires that you export the durable object class in the main what i'm asking is that you can specify another module in the wrangler config to export in the DO so do you want to see what i would like the wrangler file to look like? or do you want me to give you a repo that blows up cloudflare/vite-plugin "fixes" it by blocking you from prerendering lol i'm working around it going forward with nodejs module import loaders that will give dummy cloudflare objects i looked at the code for wrangler i'm not sure that there's a reason it wouldn't work but i maybe misunderstanding env binding works when you call the main.
hmmm - TBH its a bit out of my wheelhouse technically
I've long wanted to specify multiple "entrypoints" (in the javascript sense) from wrangler config so I could split up my DOs/Workflows/Containers into different files
I wonder if that'd fix the issue here
yes 100%
there should be a wranger definition for main then secondary entrypoints you can specifiy in the wrangler
main does fetch, secondary endpoints can be build normally then using esbuild
since you do binding through the env on main nothing really changes
vite-plugin guys put this issue on backlong i'm not sure they know how to fix
Desperately please on this the frameworks do not need to see the class definition of a DO,Agent,Container, now that everything feels likes its DO based it really is messing the build in full stack frameworks