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,6 +1,5 @@
|
||||
/** @jsx h */
|
||||
|
||||
import { h } from "$fresh/runtime.ts";
|
||||
import { h } from "preact";
|
||||
import { tw } from "../utils/twind.ts";
|
||||
|
||||
export function RoundedButton(props: h.JSX.HTMLAttributes<HTMLButtonElement>) {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/** @jsx h */
|
||||
|
||||
import { h } from "$fresh/runtime.ts";
|
||||
import { h } from "preact";
|
||||
import { apply, tw } from "../utils/twind.ts";
|
||||
|
||||
import {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/** @jsx h */
|
||||
|
||||
import { h } from "$fresh/runtime.ts";
|
||||
import { h } from "preact";
|
||||
import { tw } from "../utils/twind.ts";
|
||||
|
||||
const LINKS = [
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/** @jsx h */
|
||||
|
||||
import { h } from "$fresh/runtime.ts";
|
||||
import { h } from "preact";
|
||||
import { tw } from "../utils/twind.ts";
|
||||
|
||||
export function IconMinus() {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/** @jsx h */
|
||||
|
||||
import { h } from "$fresh/runtime.ts";
|
||||
import { h } from "preact";
|
||||
import { tw } from "../utils/twind.ts";
|
||||
|
||||
export default function NavigationBar(props: { active: string }) {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/** @jsx h */
|
||||
|
||||
import { h } from "$fresh/runtime.ts";
|
||||
import { h } from "preact";
|
||||
import { tw } from "../utils/twind.ts";
|
||||
|
||||
export default function WarningBanner() {
|
||||
|
||||
+4
-1
@@ -2,6 +2,9 @@
|
||||
"imports": {
|
||||
"$fresh/": "../",
|
||||
"$twind": "https://esm.sh/twind@0.16.16",
|
||||
"$twind/": "https://esm.sh/twind@0.16.16/"
|
||||
"$twind/": "https://esm.sh/twind@0.16.16/",
|
||||
"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";
|
||||
import { tw } from "../utils/twind.ts";
|
||||
import { RoundedButton } from "../components/Button.tsx";
|
||||
import { IconMinus, IconPlus } from "../components/Icons.tsx";
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/** @jsx h */
|
||||
/** @jsxFrag Fragment */
|
||||
import { Fragment, h, useEffect, useRef, useState } from "$fresh/runtime.ts";
|
||||
import { Fragment, h } from "preact";
|
||||
import { useEffect, useRef, useState } from "preact/hooks";
|
||||
import { tw } from "../utils/twind.ts";
|
||||
import { Spring, WaveTank } from "../components/WaveTank.ts";
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/** @jsx h */
|
||||
/** @jsxFrag Fragment */
|
||||
|
||||
import { Fragment, h, Head, PageProps } from "$fresh/runtime.ts";
|
||||
import { Fragment, h } from "preact";
|
||||
import { Head, PageProps } from "$fresh/runtime.ts";
|
||||
import { Handlers } from "$fresh/server.ts";
|
||||
import { apply, tw } from "../../utils/twind.ts";
|
||||
import { frontMatter, gfm } from "../../utils/markdown.ts";
|
||||
|
||||
@@ -1,14 +1,7 @@
|
||||
/** @jsx h */
|
||||
/** @jsxFrag Fragment */
|
||||
|
||||
import {
|
||||
asset,
|
||||
ComponentChildren,
|
||||
Fragment,
|
||||
h,
|
||||
Head,
|
||||
PageProps,
|
||||
} from "$fresh/runtime.ts";
|
||||
import { ComponentChildren, Fragment, h } from "preact";
|
||||
import { asset, Head, PageProps } from "$fresh/runtime.ts";
|
||||
import { tw } from "../utils/twind.ts";
|
||||
import Counter from "../islands/Counter.tsx";
|
||||
import LemonDrop from "../islands/LemonDrop.tsx";
|
||||
|
||||
Reference in New Issue
Block a user