-
Notifications
You must be signed in to change notification settings - Fork 120
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
fix: set package type as module #570
Conversation
Do you think we can merge this with #526? |
@AykutSarac Can we first merge this and check #526 with it? |
Since #526 doesn't trigger a release, I merged it first. Once pipeline passes on next branch, we can merge this as well. |
🎉 This PR is included in version 2.1.0-beta.7 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This PR includes the features/fixes for the release of v2.1.0 ## Features * **Switch**: CSS property to set custom color for `off` state (#527) * **Popover**: CSS properties to set `max-width` and `border-size` (#483) ## Fixes * **Dropdown**: Close dropdown when an item is clicked (#533) * **Popover**: Prevent exiting fullscreen with popover close (#551) * **Dialog**: Prevent exiting fullscreen with dialog close (#548) * **Select**: Select item separator is back (#552) * React wrapper types (#532) * Set package type as module (#570) Thanks to our contributors for this version 🚀 : @muratcorlu @ogunb @abugraokkali @AykutSarac @ozkersemih
🎉 This PR is included in version 2.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This pull request adds the "type: module" field to the package.json file. This change is made to indicate that our component library uses ECMAScript (ES) modules syntax and is designed to be consumed as an ES module.
Motivation:
By adding "type: module", we explicitly inform the JavaScript runtime and developers that our library follows the ES modules standard. This helps in promoting interoperability and enables seamless integration with modern JavaScript environments that natively support ES modules.
Benefits:
Clearer intent: By explicitly stating that our library uses ES modules, it becomes easier for developers to understand and utilize the library in projects that support ES modules.
Improved interoperability: With "type: module" specified, consumers of our library using tools like bundlers, module loaders, or build systems that understand ES modules can effortlessly incorporate our library into their projects.
Consistency: This change aligns our library with the industry trend of adopting ES modules, allowing for consistency across different projects and libraries that leverage ES modules.
Note:
Adding "type: module" implies that our library will not be compatible with older environments that only support CommonJS syntax. If we need to support both CommonJS and ES modules, we can explore using a build tool like Babel to transpile the code into CommonJS format and include both versions in the package.