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
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:
merge the plugins inside the core package, and import them with import { Tooltip } from 'cal-heatmap' => will increase build size
externalize the plugins to their own NPM package => will require installing each plugin as a new dependency
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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 whenmoduleResolution
is set toNode16
in tsconfig, andtype
set tomodule
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
, oresnext
. To ensure the broadest support of setup, multiple export is not a solution.This left us with 2 solutions:
import { Tooltip } from 'cal-heatmap'
=> will increase build sizeSolution 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) will incorporate this breaking changes.
Beta Was this translation helpful? Give feedback.
All reactions