Home > Enterprise >  Package.json: Set "version" property from another file
Package.json: Set "version" property from another file

Time:02-28

is it possible, to set the "version" property in the package.json through another (js || json) File?

Something like this:

import {AppVersion} from "./index";
{
  "name": "test_app",
  "version": AppVersion,
}

CodePudding user response:

No, it's not possible. The package.json file must be a JSON file, not a JS file, and cannot use import syntax.

  • Related