You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
adding primereact to peerDependencies is not excluding it from the bundle using vite rollupOptions.external
this is important use case when there are multiple projects like in a mfe ecosystem, where we want in the final app to include and load shared libraries only once
i was able to reduce bundle size by excluding all submodules
but this makes it impossible to resolve given submodules in the main app, because we are trying to get it to resolve using esm shared import: https://cdn.jsdelivr.net/npm/primereact@10.8.2/+esm
of course it fails:
because there's no such module in package, and the esm module primereact@10.8.2 is not resolving it either
Describe the bug
adding primereact to peerDependencies is not excluding it from the bundle using vite rollupOptions.external
this is important use case when there are multiple projects like in a mfe ecosystem, where we want in the final app to include and load shared libraries only once
i was able to reduce bundle size by excluding all submodules
but this makes it impossible to resolve given submodules in the main app, because we are trying to get it to resolve using esm shared import:
https://cdn.jsdelivr.net/npm/primereact@10.8.2/+esm
of course it fails:
because there's no such module in package, and the esm module primereact@10.8.2 is not resolving it either
for example we can mark react as an external dependency in vite, peerDependency in package.json, and include it only once using a similar link:
"react": "https://cdn.jsdelivr.net/npm/react@18.2.0/+esm",
"react-dom": "https://cdn.jsdelivr.net/npm/react-dom@18.2.0/+esm",
we would like to achieve something similar using primereact
any tips would be greatly appreciated
Reproducer
No response
System Information
Steps to reproduce the behavior
No response
Expected behavior
No response
The text was updated successfully, but these errors were encountered: