Turn __VERSION__
into the package's version string.
Given the following package.json.
{
"name": "package-using-babel-plugin-version-inline",
"version": "1.0.0"
}
__VERSION__
"1.0.0"
$ npm install babel-plugin-version-inline
.babelrc
{
"plugins": ["version-inline"]
}
$ babel --plugins version-inline script.js
require("babel-core").transform("code", {
plugins: ["version-inline"]
});