Open
Description
I integrate the Zoom plugin in my code like this:
import zoomPlugin from 'chartjs-plugin-zoom';
Then I run a Rollup build:
npm run build
The build crashes with the following error:
In order to fix the build, I go manually edit chartjs-plugin-zoom.esm.js and replace line 7:
import Hammer from 'hammerjs';
with
import 'hammerjs';
I could not find an official guide how to integrate Hammer ESM package, but this Stackoverflow answer seems to have a lot of votes and here I found the solution.
If would be great to fix this in the source code, so this fix doesn't have to be done manually after every install or update of the npm package.
Metadata
Metadata
Assignees
Labels
No labels