Get version from packageInfo (#995)

This commit is contained in:
Jaco
2022-02-01 10:34:04 +02:00
committed by GitHub
parent 981fa5e52f
commit f392fe8486
2 changed files with 4 additions and 4 deletions
+3 -1
View File
@@ -8,10 +8,12 @@ import { MESSAGE_ORIGIN_CONTENT } from '@polkadot/extension-base/defaults';
import { enable, handleResponse, redirectIfPhishing } from '@polkadot/extension-base/page';
import { injectExtension } from '@polkadot/extension-inject';
import { packageInfo } from './packageInfo';
function inject () {
injectExtension(enable, {
name: 'polkadot-js',
version: process.env.PKG_VERSION as string
version: packageInfo.version
});
}
+1 -3
View File
@@ -70,9 +70,7 @@ module.exports = (entry, alias = {}) => ({
}),
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify('production'),
PKG_NAME: JSON.stringify(pkgJson.name),
PKG_VERSION: JSON.stringify(pkgJson.version)
NODE_ENV: JSON.stringify('production')
}
}),
new CopyPlugin({ patterns: [{ from: 'public' }] }),