Get version from packageInfo (#995)

This commit is contained in:
Jaco 2022-02-01 09:34:04 +01:00 committed by GitHub
parent 981fa5e52f
commit f392fe8486
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

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
});
}

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' }] }),