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
Packages in the workspaces should set the exports field in the package.json file. As Node.JS doesn't read the module field, the ESM output may be skipped if the exports field is not added.
Specifying the exports field also prevents modules that are written in ESM from being interpreted as CommmonJS. For example, it is currently possible to make the following import:
Since there is no type specified this file would be considered CommonJS, even though the source is actually written in ESM.
The exports field supplants the main and module fields, which should be removed when the exports field is introduced. This would be considered a breaking change.
This is part of a series of issues resulting from publication linting introduced under #10764
The text was updated successfully, but these errors were encountered:
Packages in the workspaces should set the
exports
field in thepackage.json
file. As Node.JS doesn't read themodule
field, the ESM output may be skipped if theexports
field is not added.Specifying the
exports
field also prevents modules that are written in ESM from being interpreted as CommmonJS. For example, it is currently possible to make the following import:Since there is no
type
specified this file would be considered CommonJS, even though the source is actually written in ESM.The
exports
field supplants themain
andmodule
fields, which should be removed when theexports
field is introduced. This would be considered a breaking change.This is part of a series of issues resulting from publication linting introduced under #10764
The text was updated successfully, but these errors were encountered: