@@ -11,24 +11,24 @@ const root = path.resolve(__dirname);
11
11
const alias = {
12
12
'^react$' : path . join (
13
13
root ,
14
- MINIFY ? 'compat/dist/compat.js ' : 'compat/src/index.js'
14
+ MINIFY ? 'compat/dist/compat.mjs ' : 'compat/src/index.js'
15
15
) ,
16
16
'^react-dom$' : path . join (
17
17
root ,
18
- MINIFY ? 'compat/dist/compat.js ' : 'compat/src/index.js'
18
+ MINIFY ? 'compat/dist/compat.mjs ' : 'compat/src/index.js'
19
19
) ,
20
- '^preact$' : path . join ( root , MINIFY ? 'dist/preact.js ' : 'src/index.js' ) ,
20
+ '^preact$' : path . join ( root , MINIFY ? 'dist/preact.mjs ' : 'src/index.js' ) ,
21
21
'^preact/compat$' : path . join (
22
22
root ,
23
- MINIFY ? 'compat/dist/compat.js ' : 'compat/src/index.js'
23
+ MINIFY ? 'compat/dist/compat.mjs ' : 'compat/src/index.js'
24
24
) ,
25
25
'^preact/jsx-runtime$' : path . join (
26
26
root ,
27
- MINIFY ? 'jsx-runtime/dist/jsxRuntime.js ' : 'jsx-runtime/src/index.js'
27
+ MINIFY ? 'jsx-runtime/dist/jsxRuntime.mjs ' : 'jsx-runtime/src/index.js'
28
28
) ,
29
29
'^preact/jsx-runtime/src$' : path . join (
30
30
root ,
31
- MINIFY ? 'jsx-runtime/dist/jsxRuntime.js ' : 'jsx-runtime/src'
31
+ MINIFY ? 'jsx-runtime/dist/jsxRuntime.mjs ' : 'jsx-runtime/src'
32
32
) ,
33
33
'^preact/jsx-dev-runtime$' : path . join (
34
34
root ,
@@ -38,15 +38,19 @@ const alias = {
38
38
) ,
39
39
'^preact/debug$' : path . join (
40
40
root ,
41
- MINIFY ? 'debug/dist/debug.js' : 'debug/src/index.js'
41
+ MINIFY ? 'debug/dist/debug.mjs' : 'debug/src/index.js'
42
+ ) ,
43
+ '^preact/devtools$' : path . join (
44
+ root ,
45
+ MINIFY ? 'devtools/dist/devtools.js' : 'devtools/src/index.js'
42
46
) ,
43
47
'^preact/hooks$' : path . join (
44
48
root ,
45
- MINIFY ? 'hooks/dist/hooks.js ' : 'hooks/src/index.js'
49
+ MINIFY ? 'hooks/dist/hooks.mjs ' : 'hooks/src/index.js'
46
50
) ,
47
51
'^preact/test-utils$' : path . join (
48
52
root ,
49
- MINIFY ? 'test-utils/dist/testUtils.js ' : 'test-utils/src/index.js'
53
+ MINIFY ? 'test-utils/dist/testUtils.mjs ' : 'test-utils/src/index.js'
50
54
)
51
55
} ;
52
56
@@ -94,6 +98,12 @@ const rollupAlias = [
94
98
? path . join ( root , 'debug/dist/debug.mjs' )
95
99
: path . join ( root , 'debug/src/index.js' )
96
100
} ,
101
+ {
102
+ find : / ^ p r e a c t \/ d e v t o o l s $ / ,
103
+ replacement : MINIFY
104
+ ? path . join ( root , 'devtools/dist/devtools.mjs' )
105
+ : path . join ( root , 'devtools/src/index.js' )
106
+ } ,
97
107
{
98
108
find : / ^ p r e a c t \/ h o o k s $ / ,
99
109
replacement : MINIFY
@@ -223,11 +233,10 @@ export default defineConfig({
223
233
setupFiles : [ './vitest.setup.js' ] ,
224
234
globals : true ,
225
235
browser : {
226
- provider : 'webdriverio' , // or 'webdriverio'
236
+ provider : 'webdriverio' ,
227
237
enabled : true ,
228
238
screenshotFailures : false ,
229
239
headless : true ,
230
- // at least one instance is required
231
240
instances : [ { browser : 'chrome' } ]
232
241
}
233
242
}
0 commit comments