简体   繁体   中英

Package.json: Set "version" property from another file

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,
}

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM