diff --git a/packages/preact/src/SelectionArea.tsx b/packages/preact/src/SelectionArea.tsx index 7a06120..04154e1 100644 --- a/packages/preact/src/SelectionArea.tsx +++ b/packages/preact/src/SelectionArea.tsx @@ -2,8 +2,7 @@ import VanillaSelectionArea from '@viselect/vanilla'; import {SelectionEvents, SelectionOptions} from '@viselect/vanilla'; import {createContext, createRef, FunctionalComponent, JSX} from 'preact'; -import {useContext} from 'preact/compat'; -import {useEffect, useState} from 'preact/hooks'; +import {useEffect, useContext, useState} from 'preact/hooks'; export interface SelectionAreaProps extends Omit, 'boundaries'>, JSX.HTMLAttributes { id?: string; diff --git a/packages/preact/vite.config.ts b/packages/preact/vite.config.ts index 947cdba..e654bbd 100644 --- a/packages/preact/vite.config.ts +++ b/packages/preact/vite.config.ts @@ -26,11 +26,11 @@ export default defineConfig(env => ({ fileName: 'viselect', }, rollupOptions: { - external: ['preact', '@viselect/react'], + external: ['preact', 'preact/hooks', '@viselect/vanilla'], output: { globals: { preact: 'Preact', - '@viselect/react': 'SelectionArea' + '@viselect/vanilla': 'SelectionArea' }, }, },