update build id to store version number

This commit is contained in:
2023-12-06 15:20:09 +00:00
parent 3c8fd36f7d
commit ccd3b8ffc5
8 changed files with 250 additions and 183 deletions
+6 -4
View File
@@ -2,6 +2,7 @@
//const withStyles = require("@webdeb/next-styles");
//const { nextI18NextRewrites } = require("next-i18next/rewrites");
const nextTranslate = require("next-translate-plugin");
const nextBuildId = require("next-build-id");
// module.exports = withStyles({
// sass: true, // use .scss files
@@ -52,8 +53,12 @@ const securityHeaders = [
// value: "frame-src 'self'; child-src 'self';object-src 'none'; script-src 'self' 'https://www.googletagmanager.com' unsafe-inline",
// },
];
const buildId = nextBuildId.sync({ dir: __dirname });
module.exports = {
env: {
BUILD_ID_ENV: buildId,
},
swcMinify: false,
sassOptions: {
includePaths: [
@@ -72,10 +77,7 @@ module.exports = {
},
];
},
generateBuildId: async () => {
// You can, for example, get the latest git commit hash here
return "pinswg-build-id";
},
generateBuildId: () => buildId,
poweredByHeader: false,
async rewrites() {
return [