TheSadMidDeveloper
Explore posts from serversServer middleware ordering with modules
If you want more context, here:
Say you're authoring a module. This is your middleware:
and in your module
and in your app, you install it like so:
Hooray! The middleware from module is installed. Now, you want to access that in your own custom middleware...
Oh no, the
hello
context is undefined!8 replies
How to load islands in Fresh 2.0 plugins?
It errors here https://github.com/denoland/fresh/blob/e0f65319cd48753f5b9b4784f996a0eaf7e6ebff/src/dev/builder.ts#L196
15 replies
How to load islands in Fresh 2.0 plugins?
Let me check how I can share the code, but basically I tried creating a fresh project again
1.
deno run -Ar jsr:@fresh/[email protected]
2. Added a folder named (whatever
) with 2 files - (SomeComponent.tsx
, mod.ts
)
3. Create a plugin that adds it as island
SomeComponent
is a default export, just a button with an onClick
action.
mod.ts
exports SomeComponent
as named component
The plugin
and the dev.ts
file
and running deno task dev
already throws an error:
15 replies