I want to get version from package.json
I use
const version = require(path).version;
Who know this path?
@develar thank you for your replay.
I find way like this
import {version} from '../../../package.json';
export default class loadingService extends ILoading {
constructor() {
super();
}
async getVersion() {
return version;
}
}
but your is better.
I recommend you to use app.getVersion() if you only need to get app version.
Most helpful comment
I recommend you to use
app.getVersion()if you only need to get app version.