File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -1858,7 +1858,13 @@ async function loadConfigFromBundledFile(
18581858 // with --experimental-loader themselves, we have to do a hack here:
18591859 // write it to disk, load it with native Node ESM, then delete the file.
18601860 if ( isESM ) {
1861- const nodeModulesDir = findNearestNodeModules ( path . dirname ( fileName ) )
1861+ // Storing the bundled file in node_modules/ is avoided for Deno
1862+ // because Deno only supports Node.js style modules under node_modules/
1863+ // and configs with `npm:` import statements will fail when executed.
1864+ const nodeModulesDir =
1865+ typeof process . versions . deno === 'string'
1866+ ? undefined
1867+ : findNearestNodeModules ( path . dirname ( fileName ) )
18621868 if ( nodeModulesDir ) {
18631869 await fsp . mkdir ( path . resolve ( nodeModulesDir , '.vite-temp/' ) , {
18641870 recursive : true ,
You can’t perform that action at this time.
0 commit comments