single-spa / single-spa-react

Single-spa lifecycles helper for React applications
https://single-spa.js.org/docs/ecosystem-react.html
MIT License
226 stars 63 forks source link

fix(#140,#168): Define package.json export #169

Closed courtyenn closed 1 year ago

courtyenn commented 1 year ago

compiling a react application using a rollup based plugin (@vitejs/plugin-react in my case) will throw an error if package.json isn't exported.

The only package failing in my usecase is single-spa-react I did test this change by manually adding this line to the package in the node_modules folder and compiling again.

Fixes: https://github.com/single-spa/single-spa-react/issues/140 https://github.com/single-spa/single-spa-react/issues/168

courtyenn commented 1 year ago

Oops. The exports is indeed needed for vite.