sajad torkamani

Native ES imports don’t support module imports like the following:

import { someMethod } from 'some-npm-dependency'

Serving a file with the above code directly in the browser will result an error.

Vite detects such bare module imports in all served source files and rewrites the imports to valid URLs like /node_modules/.vite/deps/some-npm-dependency.js?v=123456 so that the browser can import them.

Tagged: Vite