Parcel plugin to read information about build time from env variable.
# npm
npm i -D parcel-plugin-build-time
# or yarn
yarn add -D parcel-plugin-build-time
This plugin puts the build date in an environment variable named BUILD_TIME
.
you can retrive it in js like this: process.env.BUILD_TIME
javascript
console.log("build date: " + process.env.BUILD_TIME);
output
build date: Mon Apr 20 2020 15:58:34 GMT+0200 (Central European Summer Time)