3
1
Fork
You've already forked experimental-plugins
1

refactor(hono-jsx): import from deno.land/x #34

Merged
kwaa merged 2 commits from refactor/hono-jsx into main 2024年02月04日 13:05:51 +01:00
kwaa commented 2024年02月04日 11:36:09 +01:00 (Migrated from github.com)
Copy link
https://github.com/lumeland/experimental-plugins/pull/33#discussion_r1477189791 https://github.com/lumeland/experimental-plugins/pull/33#discussion_r1477190633
kwaa commented 2024年02月04日 11:43:44 +01:00 (Migrated from github.com)
Copy link

Also, I think it would be better to remove deps.ts and import it directly from "hono/jsx/jsx-runtime" (from import_map.json) so that users can update the version themselves.

Also, I think it would be better to remove `deps.ts` and import it directly from "hono/jsx/jsx-runtime" (from `import_map.json`) so that users can update the version themselves.
kwaa commented 2024年02月04日 11:48:13 +01:00 (Migrated from github.com)
Copy link

Or lock the version like the lume main repository, set hono/jsx/jsx-runtime to deps.ts:

// ./hono-jsx/demo/import_map.json
{
 "imports": {
 "lume/": "https://deno.land/x/lume@v2.0.3/",
 "hono/jsx/jsx-runtime": "../deps.ts"
 }
}
// ./hono-jsx/deps.ts
- export { jsx } from "https://deno.land/x/hono@v3.12.10/jsx/jsx-runtime.ts";
+ export * from "https://deno.land/x/hono@v3.12.10/jsx/jsx-runtime.ts";
export const specifier = "hono/jsx";
Or lock the version like the lume main repository, set `hono/jsx/jsx-runtime` to `deps.ts`: ```jsonc // ./hono-jsx/demo/import_map.json { "imports": { "lume/": "https://deno.land/x/lume@v2.0.3/", "hono/jsx/jsx-runtime": "../deps.ts" } } ``` ```diff // ./hono-jsx/deps.ts - export { jsx } from "https://deno.land/x/hono@v3.12.10/jsx/jsx-runtime.ts"; + export * from "https://deno.land/x/hono@v3.12.10/jsx/jsx-runtime.ts"; export const specifier = "hono/jsx"; ```

The main benefit of using npm instead of deno.land/x is it's not needed to configure the import map for the jsx-runtime. (It's sad that Deno cannot handle JSX configuration in an easier way at this point , btw).
But agree that downloading only the required files is better than the whole hono package.

The main benefit of using npm instead of deno.land/x is it's not needed to configure the import map for the jsx-runtime. (It's sad that Deno cannot handle JSX configuration in an easier way at this point , btw). But agree that downloading only the required files is better than the whole hono package.
Sign in to join this conversation.
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lume/experimental-plugins!34
Reference in a new issue
lume/experimental-plugins
No description provided.
Delete branch "refactor/hono-jsx"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?