File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ import vitest from './vitest'
30
30
import uniApp from './uni-app'
31
31
import solid from './solid'
32
32
import solidAppRouter from './solid-app-router'
33
+ import { jotai , jotaiUtils } from './jotai'
33
34
34
35
export const presets = {
35
36
'@nuxtjs/composition-api' : nuxtCompositionApi ,
@@ -61,6 +62,8 @@ export const presets = {
61
62
'uni-app' : uniApp ,
62
63
'solid-js' : solid ,
63
64
'solid-app-router' : solidAppRouter ,
65
+ 'jotai' : jotai ,
66
+ 'jotai/utils' : jotaiUtils ,
64
67
}
65
68
66
69
export type PresetName = keyof typeof presets
Original file line number Diff line number Diff line change
1
+ import type { ImportsMap } from '../types'
2
+
3
+ export const jotai = < ImportsMap > ( {
4
+ jotai : [
5
+ 'atom' ,
6
+ 'useAtom' ,
7
+ 'useAtomValue' ,
8
+ 'useSetAtom' ,
9
+ ] ,
10
+ } )
11
+
12
+ export const jotaiUtils = < ImportsMap > ( {
13
+ 'jotai/utils' : [
14
+ 'atomWithReset' ,
15
+ 'useResetAtom' ,
16
+ 'useReducerAtom' ,
17
+ 'atomWithReducer' ,
18
+ 'atomFamily' ,
19
+ 'selectAtom' ,
20
+ 'useAtomCallback' ,
21
+ 'freezeAtom' ,
22
+ 'freezeAtomCreator' ,
23
+ 'splitAtom' ,
24
+ 'atomWithDefault' ,
25
+ 'waitForAll' ,
26
+ 'atomWithStorage' ,
27
+ 'atomWithHash' ,
28
+ 'createJSONStorage' ,
29
+ 'atomWithObservable' ,
30
+ 'useHydrateAtoms' ,
31
+ 'loadable' ,
32
+ ] ,
33
+ } )
You can’t perform that action at this time.
0 commit comments