Show app version

This commit is contained in:
Junyoung Choi 2020-01-14 14:27:35 -05:00 committed by Junyoung Choi
parent dcaa26c36a
commit 0ac02457f5
3 changed files with 8 additions and 2 deletions

View File

@ -3,7 +3,8 @@
"module": "commonjs",
"target": "es5",
"esModuleInterop": true,
"allowJs": true
"allowJs": true,
"resolveJsonModule": true
},
"include": ["src/**/*.ts", "src/**/*.tsx", "./typings/**/*.d.ts"]
}

View File

@ -21,6 +21,7 @@
"skipLibCheck": true,
"suppressImplicitAnyIndexErrors": true,
"strict": true,
"esModuleInterop": true
"esModuleInterop": true,
"resolveJsonModule": true
}
}

View File

@ -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 = {
@ -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',