chore: version preact explicitly in import map (#258)
This allows users to control the `preact` version independently of fresh itself.
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
{
|
||||
"imports": {
|
||||
"$fresh/": "../../"
|
||||
"$fresh/": "../../",
|
||||
"preact": "https://esm.sh/preact@10.6.6",
|
||||
"preact/": "https://esm.sh/preact@10.6.6/",
|
||||
"preact-render-to-string": "https://esm.sh/preact-render-to-string@5.1.20?deps=preact@10.6.6"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
/** @jsx h */
|
||||
import { h, IS_BROWSER, useState } from "$fresh/runtime.ts";
|
||||
import { h } from "preact";
|
||||
import { useState } from "preact/hooks";
|
||||
import { IS_BROWSER } from "$fresh/runtime.ts";
|
||||
|
||||
interface CounterProps {
|
||||
start: number;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/** @jsx h */
|
||||
import { h } from "$fresh/runtime.ts";
|
||||
import { h } from "preact";
|
||||
import Counter from "../islands/Counter.tsx";
|
||||
|
||||
export default function Home() {
|
||||
|
||||
Reference in New Issue
Block a user