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
Is your feature request related to a problem? Please describe.
Upfront note: I'd be willing to submit a PR to help out with this.
Commit c505822 inadvertantly introduced some breaking changes to subpath exports when Eleventy is consumed as a dependency. By adding the exports key to package.json with only 1 conditional import (import/requre keys), any attempt to import a subpath throws an error.
Describe the solution you'd like
This is more specific to @11ty/eleventy/src/Engines/Util/ContextAugmenter.js (#3355 (comment)) but is applicable to any exports in Eleventy that could be consumed by outside packages, including (but not limited to):
Subpath exports are supported by Node 18 which is the required minimum for 3.0. Additionally, when an exports field is present the main field isn't looked at by Node.js except in the case of require() statements, but with a exports[path].require field it's redundant to have for Node 18+.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Upfront note: I'd be willing to submit a PR to help out with this.
Commit c505822 inadvertantly introduced some breaking changes to subpath exports when Eleventy is consumed as a dependency. By adding the
exports
key to package.json with only 1 conditional import (import/requre
keys), any attempt to import a subpath throws an error.Describe the solution you'd like
This is more specific to
@11ty/eleventy/src/Engines/Util/ContextAugmenter.js
(#3355 (comment)) but is applicable to anyexports
in Eleventy that could be consumed by outside packages, including (but not limited to):.d.ts
declaration files (#3097, #3296)augmentKeys
Syntax I'm thinking of could be something like:
The above declarations can be consumed as so:
Or via an aggregator:
Describe alternatives you've considered
no response
Additional context
Subpath exports are supported by Node 18 which is the required minimum for 3.0. Additionally, when an
exports
field is present themain
field isn't looked at by Node.js except in the case ofrequire()
statements, but with aexports[path].require
field it's redundant to have for Node 18+.The text was updated successfully, but these errors were encountered: