A Babel plugin that replaces the global constant __VERSION__ with the version string from the project's package.json. Version 1.0.0 is stable but receives no active development; it's a simple compile-time macro for including the package version in code without runtime lookup. Unlike runtime version detection or bundler-specific plugins, this works in any Babel build pipeline. It's unmaintained since 2018 and has no dependencies.
npm install babel-plugin-version-inlineVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to configure the plugin in .babelrc and how __VERSION__ is replaced with the version from package.json.
Consider using @babel/plugin-transform-version-inline or a custom plugin. Alternatively, bundle version info through other means (e.g., environment variables).
Ensure your package.json version is updated before building. No runtime fallback.
Use __VERSION__ exactly, or fork the plugin to modify the replacement pattern.
Install the plugin and add 'version-inline' to your Babel plugins list. If running in Node directly (not built), __VERSION__ will not be defined; ensure you run the compiled output.
Run `npm install babel-plugin-version-inline --save-dev` and ensure you are using the correct plugin name in Babel config.
Install the plugin: npm install babel-plugin-version-inline --save-dev
No dependency data recorded yet.