Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ./* to package exports field #264

Merged
merged 1 commit into from
Apr 17, 2023

Conversation

GastonZalba
Copy link
Contributor

This addition is to allow bundlers that don't support the "exports" field to work together with others that do. On the other hand, it will help in the future to prevent modules from breaking once they add support for the use of the "exports" field.

Example: if ol-contextmenu is used in a module bundled with Rollup and PostCSS, the "exports" field is not taken into account at the scss @import, so the entire path is neccesary. But, if this new bundled module is then imported in another library using Webpack and PostCSS (which supports "exports"), will be a unresolvable conflict without this addition.

This addition is to allow bundlers that don't support the "exports" field to work together with others that do. On the other hand, it will help in the future to prevent modules from breaking once they add support for the use of the "exports" field.

Example: if ol-contextmenu is used in a module bundled with Rollup and PostCSS, the "exports" field is not taken into account at the scss @import, so the entire path is neccesary. But, if this new bundled module is then imported in another library using Webpack and PostCSS (which supports "exports"), will be a unresolvable conflict without this addition.
@jonataswalker jonataswalker merged commit 9fb773e into jonataswalker:master Apr 17, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants