When running a classic Vitest config setup, phosphor icons return errors relating to path imports, possibly due to pnpm.
Steps to Reproduce
Include phosphor icons in a react-vite repo. Then use vitest to test the component.
Behavior:
FAIL tests/components/z.test.ts [ tests/components/z.test.ts ]
Error: Cannot find package '/Users/xxxx/Documents/yyyyyy/studio-app-devtools/node_modules/@phosphor-icons/react/dist/node_modules/.pnpm/react@18.2.0/node_modules/react/package.json' imported from /Users/xxxx/Documents/yyyyyy/studio-app-devtools/node_modules/@phosphor-icons/react/dist/node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react-jsx-runtime.production.min.mjs
Did you mean to import react/index.js?
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Expected behavior
Behaves like any other React component dependency and renders like it does in production and in development servers on vite.
Screenshots
Context (please complete the following information):
Describe the bug
When running a classic Vitest config setup, phosphor icons return errors relating to path imports, possibly due to pnpm.
Steps to Reproduce
Include phosphor icons in a react-vite repo. Then use vitest to test the component.
Behavior:
Expected behavior
Behaves like any other React component dependency and renders like it does in production and in development servers on vite.
Screenshots
Context (please complete the following information):
Additional notes