Get version from packageInfo (#995)
This commit is contained in:
@@ -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
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -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' }] }),
|
||||
|
||||
Reference in New Issue
Block a user