Describe the bug
Vite fails to run on Deno after upgrading to v6 when the config file includes an import statement with the npm: specifier.
I think I have a solution so I'd like to work on a patch!
Reproduction
https://github.com/kazushisan/vite-v6-deno-bug
Steps to reproduce
using the following config:
import { defineConfig } from 'npm:vite@6'
import react from 'npm:@vitejs/plugin-react'
// @deno-types="npm:@types/react@18.3.3"
import 'npm:react@18.3.1';
// @deno-types="npm:@types/react-dom@18.3.0"
import 'npm:react-dom@18.3.1'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
})
execute the following command:
deno run -A --node-modules-dir npm:vite@5 dev
will work as expected, however the if I change the version to v6, vite will throw an error.
deno run -A --node-modules-dir npm:vite@6 dev
TypeError: [ERR_UNSUPPORTED_ESM_URL_SCHEME] Only file and data URLs are supported by the default ESM loader.
System Info
Used Package Manager
N/A
Logs
No response
Validations
Describe the bug
Vite fails to run on Deno after upgrading to v6 when the config file includes an import statement with the
npm:specifier.I think I have a solution so I'd like to work on a patch!
Reproduction
https://github.com/kazushisan/vite-v6-deno-bug
Steps to reproduce
using the following config:
execute the following command:
will work as expected, however the if I change the version to v6, vite will throw an error.
System Info
Used Package Manager
N/A
Logs
No response
Validations