Skip to content

Commit

Permalink
feat: av
Browse files Browse the repository at this point in the history
  • Loading branch information
CarinaDraganJW committed Jul 4, 2023
1 parent 4bb194d commit 743af3e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions public/jwpltx.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ window.jwpltx = window.jwpltx || {};
uri.fed = fed;
uri.id = id;
uri.t = t;
// eslint-disable-next-line no-undef
uri.av = APP_VERSION;

// Send oaid only for logged in users
if (oaid) {
Expand Down
1 change: 1 addition & 0 deletions types/env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ interface ImportMetaEnv {
readonly APP_GITHUB_PUBLIC_BASE_URL: string | undefined;
readonly APP_DEFAULT_LANGUAGE: string | undefined;
readonly APP_ENABLED_LANGUAGES: string | undefined;
readonly APP_VERSION: string | undefined;
}

interface ImportMeta {
Expand Down
3 changes: 3 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ export default ({ mode, command }: ConfigEnv): UserConfigExport => {
targets: fileCopyTargets,
}),
],
define: {
APP_VERSION: JSON.stringify(process.env.npm_package_version),
},
publicDir: './public',
envPrefix: 'APP_',
server: {
Expand Down

0 comments on commit 743af3e

Please sign in to comment.