Open dearlordylord opened 5 months ago
Did you find a workaround for this? We're also having the issue where we've created a vite plugin as a library, it doesn't find the library correctly when imported into vite.config, the paths aren't working.
I didn't. I have an impression NX doesn't support ESM modules out-of-the-box, you have to actually change all your libs to ESM for it to work
Current Behavior
I'm importing
import UnpluginTypia from '@ryoppippi/unplugin-typia/vite'
in vite.config.tsnx serve
giveshowever, a project created from https://vitejs.dev/guide/#scaffolding-your-first-vite-project (
npm create vite@latest
) imports the same plugin successfully and runs withnpm run dev
(ref: https://github.com/dearlordylord/typia-vite , don't mind README there, it's related to a runtime error in their plugin)Expected Behavior
It
serve
s without an error, likenpm run dev
runs in the official scaffold.GitHub Repo
https://github.com/dearlordylord/typia-nx
Steps to Reproduce
npx jsr add -D @ryoppippi/unplugin-typia
import UnpluginTypia from '@ryoppippi/unplugin-typia/vite'
in vite.config.ts of the appNx Report