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:
+2
-1
@@ -1,4 +1,5 @@
|
||||
import { createContext, useContext } from "./deps.ts";
|
||||
import { createContext } from "preact";
|
||||
import { useContext } from "preact/hooks";
|
||||
|
||||
export const SELF = "'self'";
|
||||
export const UNSAFE_INLINE = "'unsafe-inline'";
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
export * from "https://esm.sh/preact@10.6.6";
|
||||
export { jsx, jsxDEV, jsxs } from "https://esm.sh/preact@10.6.6/jsx-runtime";
|
||||
export {
|
||||
useCallback,
|
||||
useContext,
|
||||
useDebugValue,
|
||||
useEffect,
|
||||
useErrorBoundary,
|
||||
useImperativeHandle,
|
||||
useLayoutEffect,
|
||||
useMemo,
|
||||
useReducer,
|
||||
useRef,
|
||||
useState,
|
||||
} from "https://esm.sh/preact@10.6.6/hooks";
|
||||
export type {
|
||||
CreateHandle,
|
||||
EffectCallback,
|
||||
Inputs,
|
||||
PropRef,
|
||||
Reducer,
|
||||
Ref,
|
||||
StateUpdater,
|
||||
} from "https://esm.sh/preact@10.6.6/hooks";
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
import { ComponentChildren, createContext, useContext } from "./deps.ts";
|
||||
import { ComponentChildren, createContext } from "preact";
|
||||
import { useContext } from "preact/hooks";
|
||||
|
||||
export interface HeadProps {
|
||||
children: ComponentChildren;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { ComponentType, h, options, render } from "./deps.ts";
|
||||
import { ComponentType, h, options, render } from "preact";
|
||||
import { assetHashingHook } from "./utils.ts";
|
||||
|
||||
function createRootFragment(
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ComponentType } from "./deps.ts";
|
||||
import { ComponentType } from "preact";
|
||||
|
||||
// deno-lint-ignore no-explicit-any
|
||||
export interface PageProps<T = any> {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { VNode } from "./deps.ts";
|
||||
import { VNode } from "preact";
|
||||
|
||||
export const INTERNAL_PREFIX = "/_frsh";
|
||||
export const ASSET_CACHE_BUST_KEY = "__frsh_c";
|
||||
|
||||
Reference in New Issue
Block a user