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

New external plugins repositories #487

Open
2 of 4 tasks
wa0x6e opened this issue Feb 11, 2024 Discussed in #486 · 1 comment
Open
2 of 4 tasks

New external plugins repositories #487

wa0x6e opened this issue Feb 11, 2024 Discussed in #486 · 1 comment
Assignees

Comments

@wa0x6e
Copy link
Owner

wa0x6e commented Feb 11, 2024

Discussed in #486

Originally posted by wa0x6e February 11, 2024
Following #366

The current plugin files are not exported correctly. I made some tests, by trying to add all plugins files and types to the export property in package.json, and got it working only on when moduleResolution is set to Node16 in tsconfig, and type set to module in package.json in the package importing cal-heatmap.

Multiple export from package.json is available only on recent config, and broken on package using node, or esnext. To ensure the broadest support of setup, multiple export is not a solution.

This left us with 2 solutions:

  1. merge the plugins inside the core package, and import them with import { Tooltip } from 'cal-heatmap' => will increase build size
  2. externalize the plugins to their own NPM package => will require installing each plugin as a new dependency

Solution 2 has been retained, and all plugins will have their own repositories in https://github.com/cal-heatmap/

Refactoring is in progress, and next release (4.3.0, or maybe even 5) will incorporate this breaking changes.

@wa0x6e wa0x6e self-assigned this Feb 11, 2024
@wa0x6e wa0x6e pinned this issue Feb 11, 2024
@savakarrohan
Copy link

Hey, Any way I can help?

I need to use these plugins in a react application building through typescript in a NodeNext moduleRes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants