Now process.env.VERSION is going to be "1.0.7" inside npm "build" script.

Using$npm_package_KEY, it is possible to access particular key/property value. Even a value from a deeply nested object. Where KEY is a name of the property with nesting separated by _ (underscore) character: