Using __dirname
inside a plugin points to the dirname of that file instead of the dirname of vite.config.ts
.
__dirname
points to the directory that vite.config.ts
resides in, regardless of where the plugin file is placed.
- Clone this repo
- Run
npm install
- Run
npm start
-> Check terminal output