@@ -39,6 +39,7 @@ export default defineConfig({
3939 } ,
4040 output : {
4141 dir : './dist/node' ,
42+ chunkFileNames : 'chunks/[name].d.ts' ,
4243 format : 'esm' ,
4344 } ,
4445 treeshake : {
@@ -138,8 +139,8 @@ function patchTypes(): Plugin {
138139 const importBindings = getAllImportBindings ( ast )
139140 if (
140141 chunk . fileName . startsWith ( 'module-runner' ) ||
141- // index and moduleRunner have a common chunk "moduleRunnerTransport"
142- chunk . fileName . startsWith ( 'moduleRunnerTransport ' ) ||
142+ // index and moduleRunner have a common chunk
143+ chunk . fileName . startsWith ( 'chunks/ ' ) ||
143144 chunk . fileName . startsWith ( 'types.d-' )
144145 ) {
145146 validateRunnerChunk . call ( this , chunk , importBindings )
@@ -211,8 +212,8 @@ function validateRunnerChunk(
211212 ! id . startsWith ( './' ) &&
212213 ! id . startsWith ( '../' ) &&
213214 ! id . startsWith ( '#' ) &&
214- // index and moduleRunner have a common chunk "moduleRunnerTransport"
215- ! id . startsWith ( 'moduleRunnerTransport.d ' ) &&
215+ // index and moduleRunner have a common chunk
216+ ! id . startsWith ( 'chunks/ ' ) &&
216217 ! id . startsWith ( 'types.d' )
217218 ) {
218219 this . warn (
@@ -240,8 +241,8 @@ function validateChunkImports(
240241 ! id . startsWith ( 'node:' ) &&
241242 ! id . startsWith ( 'types.d' ) &&
242243 ! id . startsWith ( 'vite/' ) &&
243- // index and moduleRunner have a common chunk "moduleRunnerTransport"
244- ! id . startsWith ( 'moduleRunnerTransport.d ' ) &&
244+ // index and moduleRunner have a common chunk
245+ ! id . startsWith ( 'chunks/ ' ) &&
245246 ! deps . includes ( id ) &&
246247 ! deps . some ( ( name ) => id . startsWith ( name + '/' ) )
247248 ) {
0 commit comments