@@ -15,16 +15,41 @@ export default defineConfig({
1515 } ,
1616 rollupOptions : {
1717 input : [
18- path . resolve ( import . meta. dirname , 'accept-exports/dynamic-imports/index.html' ) ,
19- path . resolve ( import . meta. dirname , 'accept-exports/export-from/index.html' ) ,
20- path . resolve ( import . meta. dirname , 'accept-exports/main-accepted/index.html' ) ,
21- path . resolve ( import . meta. dirname , 'accept-exports/main-non-accepted/index.html' ) ,
22- path . resolve ( import . meta. dirname , 'accept-exports/side-effects/index.html' ) ,
23- path . resolve ( import . meta. dirname , 'accept-exports/star-imports/index.html' ) ,
24- path . resolve ( import . meta. dirname , 'accept-exports/unused-exports/index.html' ) ,
18+ path . resolve (
19+ import . meta. dirname ,
20+ 'accept-exports/dynamic-imports/index.html' ,
21+ ) ,
22+ path . resolve (
23+ import . meta. dirname ,
24+ 'accept-exports/export-from/index.html' ,
25+ ) ,
26+ path . resolve (
27+ import . meta. dirname ,
28+ 'accept-exports/main-accepted/index.html' ,
29+ ) ,
30+ path . resolve (
31+ import . meta. dirname ,
32+ 'accept-exports/main-non-accepted/index.html' ,
33+ ) ,
34+ path . resolve (
35+ import . meta. dirname ,
36+ 'accept-exports/side-effects/index.html' ,
37+ ) ,
38+ path . resolve (
39+ import . meta. dirname ,
40+ 'accept-exports/star-imports/index.html' ,
41+ ) ,
42+ path . resolve (
43+ import . meta. dirname ,
44+ 'accept-exports/unused-exports/index.html' ,
45+ ) ,
2546 path . resolve ( import . meta. dirname , 'index.html' ) ,
26- ]
27- }
47+ ] ,
48+ // TODO(underfin): find a nice way
49+ // The vite root not using `cwd` option call rolldown, the rolldown register module is base on process.cwd to calculate path.
50+ // make full bundle mode print the hmr path base on the dirname
51+ cwd : import . meta. dirname ,
52+ } ,
2853 } ,
2954 plugins : [
3055 {
0 commit comments