Skip to content

Commit

Permalink
fix: use alias via import-map
Browse files Browse the repository at this point in the history
  • Loading branch information
kazupon committed Oct 20, 2023
1 parent 16e06dd commit c44e2bb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
3 changes: 3 additions & 0 deletions playground/deno/deno.jsonc
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"imports": {
"@intlify/utils": "https://esm.sh/@intlify/[email protected]"
},
"tasks": {
"dev": "deno run --watch main.ts",
"test": "deno test --allow-read=$(which deno) --allow-run --allow-net ./deno.spec.ts"
Expand Down
3 changes: 0 additions & 3 deletions playground/deno/deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions playground/deno/main.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// @ts-ignore: this is example
import { getHeaderLanguages } from 'https://esm.sh/@intlify/utils'
import { getHeaderLanguages } from "@intlify/utils";

const port = 8125
const port = 8125;
Deno.serve({
port,
}, (req: Request) => {
const languages = getHeaderLanguages(req)
return new Response(`detect accpect-language: ${languages}`)
})
console.log(`server listening on ${port}`)
const languages = getHeaderLanguages(req);
return new Response(`detect accpect-language: ${languages}`);
});
console.log(`server listening on ${port}`);

0 comments on commit c44e2bb

Please sign in to comment.