I try using the lib in my project to fix Windows builds via GitHub actions. Otherwise my projects build fine.
Seems like the lib isn't compatible with ES modules setup...
Here's the repo https://github.com/davay42/vitepress-pages
ReferenceError: __dirname is not defined in ES module scope
at node_modules/.pnpm/app-root-path@3.1.0/node_modules/app-root-path/index.js (file:///Users/davay/Documents/%D0%A4%D0%A0%D0%A3%D0%9A%D0%A2/Chromatone/chromatone.center/node_modules/.pnpm/vitepress-pages@0.9.0_vite-plugin-pages@0.28.0/node_modules/vitepress-pages/dist/index.js:129:26)
at __require2 (file:///Users/davay/Documents/%D0%A4%D0%A0%D0%A3%D0%9A%D0%A2/Chromatone/chromatone.center/node_modules/.pnpm/vitepress-pages@0.9.0_vite-plugin-pages@0.28.0/node_modules/vitepress-pages/dist/chunk-2LGAEF77.js:15:50)
at file:///Users/davay/Documents/%D0%A4%D0%A0%D0%A3%D0%9A%D0%A2/Chromatone/chromatone.center/node_modules/.pnpm/vitepress-pages@0.9.0_vite-plugin-pages@0.28.0/node_modules/vitepress-pages/dist/index.js:138:36
at ModuleJob.run (node:internal/modules/esm/module_job:193:25)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:541:24)
at async loadConfigFromBundledFile (file:///Users/davay/Documents/%D0%A4%D0%A0%D0%A3%D0%9A%D0%A2/Chromatone/chromatone.center/node_modules/.pnpm/vite@4.0.4/node_modules/vite/dist/node/chunks/dep-5e7f419b.js:62084:21)
at async loadConfigFromFile (file:///Users/davay/Documents/%D0%A4%D0%A0%D0%A3%D0%9A%D0%A2/Chromatone/chromatone.center/node_modules/.pnpm/vite@4.0.4/node_modules/vite/dist/node/chunks/dep-5e7f419b.js:61969:28)
at async resolveConfig (file:///Users/davay/Documents/%D0%A4%D0%A0%D0%A3%D0%9A%D0%A2/Chromatone/chromatone.center/node_modules/.pnpm/vite@4.0.4/node_modules/vite/dist/node/chunks/dep-5e7f419b.js:61590:28)
at async doBuild (file:///Users/davay/Documents/%D0%A4%D0%A0%D0%A3%D0%9A%D0%A2/Chromatone/chromatone.center/node_modules/.pnpm/vite@4.0.4/node_modules/vite/dist/node/chunks/dep-5e7f419b.js:44358:20)
```
I try using the lib in my project to fix Windows builds via GitHub actions. Otherwise my projects build fine.
Seems like the lib isn't compatible with ES modules setup...
Here's the repo https://github.com/davay42/vitepress-pages