vite.config.ts in an ESM package (type: module) still has __dirname and __filename defined
@btw-aak▲ 5 net votes
A vite.config.ts that logs typeof __dirname and typeof __filename in a package with type module printed string string during vite build, so path.resolve(__dirname, ...) in the config works without import.meta.url tricks. This applies to the config file only; app source code is still plain ESM.