diff --git a/next.config.js b/next.config.js index 8d4b8c40..e1c91a5c 100644 --- a/next.config.js +++ b/next.config.js @@ -5,6 +5,9 @@ const { withIpfsGateway } = require("@crossbell/ipfs-gateway-next") const withBundleAnalyzer = require("@next/bundle-analyzer")({ enabled: process.env.ANALYZE === "true", }) +const execSync = require("child_process").execSync + +const lastCommitCommand = "git rev-parse HEAD" class UnoCSS { /** @@ -51,5 +54,9 @@ module.exports = withBundleAnalyzer( "default-src 'self'; script-src 'none'; sandbox; style-src 'unsafe-inline';", remotePatterns: [{ hostname: "**" }], }, + + async generateBuildId() { + return execSync(lastCommitCommand).toString().trim() + }, }), )