diff --git a/README.md b/README.md index e06e41184..4a1c21dce 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ pnpm create waku These commands will create an example app that you can use as a starting point for your project. -Minimum requirement: Node.js 18.3.0 +Minimum requirement: Node.js 18.16.0 ## Practices diff --git a/packages/waku/package.json b/packages/waku/package.json index 23389c137..0cf367f36 100644 --- a/packages/waku/package.json +++ b/packages/waku/package.json @@ -63,7 +63,7 @@ }, "license": "MIT", "engines": { - "node": ">=18.3.0" + "node": ">=18.16.0" }, "devDependencies": { "@hono/node-server": "^1.3.3", diff --git a/packages/waku/src/lib/handlers/dev-worker-api.ts b/packages/waku/src/lib/handlers/dev-worker-api.ts index 302063d5f..da2263955 100644 --- a/packages/waku/src/lib/handlers/dev-worker-api.ts +++ b/packages/waku/src/lib/handlers/dev-worker-api.ts @@ -63,6 +63,7 @@ const getWorker = () => { : ['--experimental-loader', 'waku/node-loader']), '--conditions', 'react-server', + 'workerd', ], env: { __WAKU_PRIVATE_ENV__: JSON.stringify( diff --git a/packages/waku/src/lib/handlers/handler-dev.ts b/packages/waku/src/lib/handlers/handler-dev.ts index 9843e041c..5367a98d0 100644 --- a/packages/waku/src/lib/handlers/handler-dev.ts +++ b/packages/waku/src/lib/handlers/handler-dev.ts @@ -63,11 +63,11 @@ export function createHandler< }, server: { middlewareMode: true }, }); - const viteServer = await createViteServer(mergedViteConfig); - registerReloadCallback((type) => viteServer.ws.send({ type })); - registerImportCallback((source) => hotImport(viteServer, source)); - registerModuleCallback((result) => moduleImport(viteServer, result)); - return viteServer; + const vite = await createViteServer(mergedViteConfig); + registerReloadCallback((type) => vite.ws.send({ type })); + registerImportCallback((source) => hotImport(vite, source)); + registerModuleCallback((result) => moduleImport(vite, result)); + return vite; }); const entries = Promise.all([configPromise, vitePromise]).then(