File tree Expand file tree Collapse file tree 2 files changed +31
-3
lines changed Expand file tree Collapse file tree 2 files changed +31
-3
lines changed Original file line number Diff line number Diff line change 1
- # Title
1
+ # verbatimModuleSyntax
2
2
3
3
Date: 2024-05-30
4
4
5
- Status: accepted
5
+ Status: deprecated
6
+
7
+ Deprecation date: 2024-05-31
8
+
9
+ ## Deprecation Note
10
+
11
+ Turns out in Remix that ` verbatimModuleSyntax ` will cause issues if you try to
12
+ import a ` type ` from a ` .server ` file into a non ` .server ` file. Like what we do
13
+ in the Epic Stack for our toast utilities:
14
+
15
+ ``` ts
16
+ import { useEffect } from ' react'
17
+ import { toast as showToast } from ' sonner'
18
+ import { type Toast } from ' #app/utils/toast.server.ts' // <-- the build is very unhappy about this with verbatimModuleSyntax
19
+
20
+ export function useToast(toast ? : Toast | null ) {
21
+ useEffect (() => {
22
+ if (toast ) {
23
+ setTimeout (() => {
24
+ showToast [toast .type ](toast .title , {
25
+ id: toast .id ,
26
+ description: toast .description ,
27
+ })
28
+ }, 0 )
29
+ }
30
+ }, [toast ])
31
+ }
32
+ ```
33
+
34
+ For that reason, this has been removed from the config.
6
35
7
36
## Context
8
37
Original file line number Diff line number Diff line change 9
9
"skipLibCheck" : true ,
10
10
"allowImportingTsExtensions" : true ,
11
11
"noUncheckedIndexedAccess" : true ,
12
- "verbatimModuleSyntax" : true ,
13
12
"noEmit" : true
14
13
}
15
14
}
You can’t perform that action at this time.
0 commit comments