Fixes #292 Display version number
This commit is contained in:
parent
e66b3597ef
commit
22137ed777
@ -11,6 +11,9 @@ if (process.env.NODE_ENV !== 'production') {
|
||||
require('./utils.css'); // eslint-disable-line
|
||||
}
|
||||
|
||||
// Log the version number
|
||||
console.log(`Netlify CMS version ${NETLIFY_CMS_VERSION}`);
|
||||
|
||||
// Create mount element dynamically
|
||||
const el = document.createElement('div');
|
||||
el.id = 'root';
|
||||
|
@ -45,6 +45,9 @@ module.exports = merge.smart(require('./webpack.base.js'), {
|
||||
NODE_ENV: JSON.stringify('development'),
|
||||
},
|
||||
}),
|
||||
new webpack.DefinePlugin({
|
||||
NETLIFY_CMS_VERSION: JSON.stringify(require("./package.json").version + "-dev")
|
||||
}),
|
||||
new webpack.optimize.OccurenceOrderPlugin(),
|
||||
new webpack.HotModuleReplacementPlugin(),
|
||||
new webpack.NoErrorsPlugin(),
|
||||
|
@ -30,6 +30,9 @@ module.exports = merge.smart(require('./webpack.base.js'), {
|
||||
NODE_ENV: JSON.stringify('production'),
|
||||
},
|
||||
}),
|
||||
new webpack.DefinePlugin({
|
||||
NETLIFY_CMS_VERSION: JSON.stringify(require("./package.json").version)
|
||||
}),
|
||||
new webpack.optimize.OccurenceOrderPlugin(),
|
||||
|
||||
// Minify and optimize the JavaScript
|
||||
|
Loading…
x
Reference in New Issue
Block a user