Skip to content

Commit

Permalink
Update current time format in webpack configuration to ISO string
Browse files Browse the repository at this point in the history
  • Loading branch information
Adamik10 committed Jan 3, 2025
1 parent 9cd7051 commit 8db14fd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module.exports = (_env, argv) => {
];

if (process.env.VERSION_FILE_NAME && process.env.VERSION_FILE_VERSION) {
const currentTime = new Date(); // Add current time to the context
const currentTime = new Date().toISOString();
plugins.push(
new VersionFile({
template: path.join(__dirname, ".version.json.ejs"),
Expand All @@ -40,10 +40,10 @@ module.exports = (_env, argv) => {
version: process.env.VERSION_FILE_VERSION,
// We intentionally do not use any information from package.json but
// VersionFile require that we provide it.
packageFile: path.join(__dirname, "package.json"),
data: {
currentTime // Required
}
},
packageFile: path.join(__dirname, "package.json")
})
);
}
Expand Down

0 comments on commit 8db14fd

Please sign in to comment.