Open Dominic-Marcelino opened 2 years ago
Have you tried using the beta version? https://www.npmjs.com/package/matomo-tracker
It is using typescript and assuming I published it correctly (#64), it should probably work better with imports.
VsCode displays an error related to the construct signature, but except from that it seems to work! (from the first tests)
Now importing it via import MatomoTracker from "matomo-tracker";
The TS-Error in VsCode:
This expression is not constructable.
Type 'typeof import("/Users/dominic/Code/_directus-extensions/directus-extension-application-monitoring/node_modules/matomo-tracker/index")' has no construct signatures.ts(2351)
Due to our build-pipeline we can't use
require
to include the module. Using require it would't get bundled into the final build.If we try to use import (
import * as MatomoTracker from "matomo-tracker";
) we can bundle it correctly but it throws an error on runtime:TypeError: Vn is not a constructor
Is there anything we can do?
Thanks a lot