Unloaded waku.config.ts when build && start in managed mode
t6adev opened this issue · comments
I noticed that waku.config.ts
is not loaded in prod ( build and start ) when coding middleware in managed mode(File-based routing).
Reproduction
You can see the top page. (This is not expected behavior)
- pnpm create waku
- Add waku.config.ts as minimal (See below)
- pnpm build && pnpm start
// waku.config.ts
/** @type {import('waku/config').Config} */
export default {
middleware: () => [], // Actually, we have to import `waku/middleware/dev-server`, `waku/middleware/ssr` and `waku/middleware/rsc` as normal
};
For clarification, you can see a blank page if you run pnpm dev
. (This is the expected behavior)
Note
However, the 08_cookies of examples is correctly working.
However, the 08_cookies of examples is correctly working.
Does it work if you pnpm create --choose
and choose 08_cookies
?
Yes, it does.
And it was my fault. When applying middleware, I didn't realize that a page should be set in dynamic render mode.
I was confused that dev mode can run middleware, so I'm sorry for bothering you.