Closed giacomorebonato closed 1 year ago
My (quick) guess would be that it's a workspaces + Vite issue.
You could try adding react
as a dev dependency of your library. This won't affect Microbundle/your output at all, but what I'm guessing is going on is Vite is attempting to resolve react
through packages/markdown-editor
, and PNPM hasn't set up proper links for react
as it's not listed as a dependency in your library.
That worked indeed. Thank you!
I made a React component and I am doing the build with Microbundle. Everything works OK in dev.
To test it out I created also an example in the same repo. https://github.com/giacomorebonato/wysiwyg-markdown-react
The example is created with Vite, which as I said works well when I do
pnpm dev
, but it fails with the following error when doingpnpm build
Do you think that I am in the right place to ask for help? I am wondering if it is a Vite issue, which in theory should bring in React, but I am not sure at this point
The steps for reproducing the issues are