From 92ceb01e8df64a626a05506be72a7b6d41cb8346 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fatih=20Ayg=C3=BCn?= Date: Sun, 8 Sep 2024 13:19:09 +0100 Subject: [PATCH] fix: add deno bundler shims to package.json#files (#152) --- packages/bundler/bundler-deno/package.json | 3 ++- packages/bundler/bundler-deno/readme.md | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/bundler/bundler-deno/package.json b/packages/bundler/bundler-deno/package.json index f16e880b..591e1974 100644 --- a/packages/bundler/bundler-deno/package.json +++ b/packages/bundler/bundler-deno/package.json @@ -5,7 +5,8 @@ "description": "Deno bundler for Hattip", "files": [ "dist", - "deno-env-shim.js" + "deno-env-shim.js", + "shims" ], "exports": "./dist/index.js", "typesVersions": { diff --git a/packages/bundler/bundler-deno/readme.md b/packages/bundler/bundler-deno/readme.md index 428430ab..c9121c8a 100644 --- a/packages/bundler/bundler-deno/readme.md +++ b/packages/bundler/bundler-deno/readme.md @@ -17,10 +17,10 @@ Options: The input should be a Deno module similar to the following: ```js -import { serve, createRequestHandler } from "@hattip/adapter-deno"; +import { createRequestHandler } from "@hattip/adapter-deno"; import handler from "./handler.js"; -serve(createRequestHandler(handler), { port: 3000 }); +Deno.serve(createRequestHandler(handler), { port: 3000 }); ``` If you want serve static files too, you can use the `serveDir` function. Assuming your static files are in the `public` directory, you can use the following: