Skip to content

Commit

Permalink
Show app version
Browse files Browse the repository at this point in the history
  • Loading branch information
Rokt33r committed Jan 14, 2020
1 parent dcaa26c commit 0ac0245
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion tsconfig-webpack.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"module": "commonjs",
"target": "es5",
"esModuleInterop": true,
"allowJs": true
"allowJs": true,
"resolveJsonModule": true
},
"include": ["src/**/*.ts", "src/**/*.tsx", "./typings/**/*.d.ts"]
}
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"skipLibCheck": true,
"suppressImplicitAnyIndexErrors": true,
"strict": true,
"esModuleInterop": true
"esModuleInterop": true,
"resolveJsonModule": true
}
}
4 changes: 4 additions & 0 deletions webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import express from 'express'
import ErrorOverlayPlugin from 'error-overlay-webpack-plugin'
import CopyPlugin from 'copy-webpack-plugin'
import TerserPlugin from 'terser-webpack-plugin'
import packageJson from './package.json'

module.exports = (env, argv) => {
const config = {
Expand Down Expand Up @@ -59,6 +60,9 @@ module.exports = (env, argv) => {
template: 'index.html'
}),
new ErrorOverlayPlugin(),
new webpack.DefinePlugin({
'process.env.VERSION': JSON.stringify(packageJson.version)
}),
new webpack.EnvironmentPlugin([
'NODE_ENV',
'AMPLIFY_AUTH_IDENTITY_POOL_ID',
Expand Down

0 comments on commit 0ac0245

Please sign in to comment.