aboutsummaryrefslogtreecommitdiffstats
path: root/.eleventy.js
diff options
context:
space:
mode:
Diffstat (limited to '.eleventy.js')
-rw-r--r--.eleventy.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/.eleventy.js b/.eleventy.js
index d913ac6..70755b0 100644
--- a/.eleventy.js
+++ b/.eleventy.js
@@ -6,7 +6,7 @@ const { DateTime } = require('luxon')
const postcss = require('postcss')
const postcssenv = require('postcss-preset-env')
const babel = require("@babel/core");
-const env = require('./src/data/env')
+const crypto = require('crypto')
module.exports = eleventyConfig => {
eleventyConfig.addPlugin(eleventysyntaxhighlight)
@@ -60,6 +60,11 @@ module.exports = eleventyConfig => {
bugfixes: true
}]
],
+ plugins: [
+ ["transform-define", {
+ VERSION: `${data.env.CF_PAGES_BRANCH || "default"}-${data.env.CF_PAGES_COMMIT_SHA || crypto.randomUUID()}`
+ }]
+ ],
sourceMaps: data.env.NODE_ENV == "develoment" ? "inline" : false,
sourceFileName: filename
})