Skip to content

Commit

Permalink
fix: a more safe way of including epas package version (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
birme authored Mar 3, 2022
1 parent e01098f commit 0dcc4dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ export enum EPASEvents {

export const HEARTBEAT_INTERVAL = 30000;

const { version } = require("../../node_modules/@eyevinn/player-analytics-specification/package.json");
export const EPAS_VERSION = version;
import packageJson from "@eyevinn/player-analytics-specification/package.json";
export const EPAS_VERSION = packageJson.version;
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"target": "es5",
"declaration": true,
"declarationDir": "./dist",
"emitDeclarationOnly": true
"emitDeclarationOnly": true,
"resolveJsonModule": true
},
"exclude": ["node_modules", "demo", "dist"]
}

0 comments on commit 0dcc4dd

Please sign in to comment.