Use MAJOR_VERSION from package.json

This commit is contained in:
Surma
2019-02-11 13:07:10 +00:00
parent 7998cf247b
commit efad4f612f
4 changed files with 8 additions and 6 deletions

View File

@@ -263,6 +263,7 @@ module.exports = async function (_, env) {
// Inline constants during build, so they can be folded by UglifyJS.
new webpack.DefinePlugin({
VERSION: JSON.stringify(VERSION),
MAJOR_VERSION: JSON.stringify(VERSION.split(".")[0]),
// We set node.process=false later in this config.
// Here we make sure if (process && process.foo) still works:
process: '{}'