Running yarn vite works, but yarn vite dev fails with the The Node package importer cannot determine an entry point becauserequire.main.filenameis not defined. error. Stepping through sass.dart.js in the debugger, I can see that the value of process.argv contains 3 values, and so if (process.argv case [_, String path]) does not match.
We have worked around this issue by providing "." as an entry point to the NodePackageImporter.
Currently, it appears that an entryPoint is only found if
argv
has exactly 2 arguments.I'm observing this in a Vite project, with the
css
key invite.config.ts
setting up the package importer using the legacy API-Running
yarn vite
works, butyarn vite dev
fails with theThe Node package importer cannot determine an entry point because
require.main.filenameis not defined.
error. Stepping throughsass.dart.js
in the debugger, I can see that the value ofprocess.argv
contains 3 values, and soif (process.argv case [_, String path])
does not match.We have worked around this issue by providing
"."
as an entry point to the NodePackageImporter.