diff --git a/package.json b/package.json index dcf2e92..413414d 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "A convenient event tracker API which sends events to multiple consumers", "main": "dist/siddi.js", "scripts": { - "build": "MATOMO_OFFSET=3 webpack --mode=production", + "build": "tsc", "build:dev": "MATOMO_OFFSET=3 webpack --mode=development", "build:prod": "MATOMO_OFFSET=0 webpack --mode=production", "lint": "prettier --print-width 120 --single-quote --trailing-comma es5 --write \"src/**/*.ts\"", diff --git a/src/utils.ts b/src/utils.ts index 9d2ee97..1baebf7 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -7,7 +7,7 @@ const prepareMatomoDimensions = (eventProperties: any) => { if (!regexParts[1]) { return { ...evProps, [k]: v }; } - return { ...evProps, [`dimension${parseInt(regexParts[1]) + WEBPACK_INJECT___MATOMO_DIMENSION_OFFSET}`]: v }; + return { ...evProps, [`dimension${parseInt(regexParts[1]) + 3}`]: v }; }, {}); }; diff --git a/tsconfig.json b/tsconfig.json index b5d7764..cba7db6 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "target": "es5", - "module": "commonjs", + "module": "es2015", "lib": [ "dom", "es2015", "es2017" ], "declaration": true, "sourceMap": true,