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
Rollup's Common.js plugin got a big update. It seems to solve a lot of issues around CJS<->ESM interop, which is great, but it also seems to be much more explicit about the fact that Common.js files only export a default export. This breaks packages like React, where their official docs say to use named exports (import {useState} from React), without any fallback like namedExports (that support was removed in v12).
Oddly enough, the advice in rollup/plugins#423 aligns with the work that we knew we needed to do anyway in #408. But then the question becomes: how far do we take this support?
We should really align with Node.js in getting serious about Common.js only using a single default export, but that would introduce a ton of issues for React users when all the React docs say to use multiple named exports.
Users migrating from Webpack will want their existing code to run, which may include named imports from CJS packages. We should support these users, at least in some sort of "loose" mode to help them migrate.
I hate to drop namedExport support outside of a major version bump, but it feels too soon to throw users a 3.0 version.
The text was updated successfully, but these errors were encountered:
Rollup's Common.js plugin got a big update. It seems to solve a lot of issues around CJS<->ESM interop, which is great, but it also seems to be much more explicit about the fact that Common.js files only export a default export. This breaks packages like React, where their official docs say to use named exports (
import {useState} from React
), without any fallback likenamedExports
(that support was removed in v12).Oddly enough, the advice in rollup/plugins#423 aligns with the work that we knew we needed to do anyway in #408. But then the question becomes: how far do we take this support?
namedExport
support outside of a major version bump, but it feels too soon to throw users a 3.0 version.The text was updated successfully, but these errors were encountered: