chore: print build info

This commit is contained in:
lawvs committed 2022-11-03 18:56:11 +08:00
1 parent de77cabd59
commit 4171874767
4 files changed
+104 -1

No files matched your search

+14 -1
View File
@@ -1,10 +1,23 @@
const withTM = require('next-transpile-modules')(['@toeverything/pathfinder-logger']);
// @ts-check
const withTM = require('next-transpile-modules')([
'@toeverything/pathfinder-logger',
]);
const { getGitVersion, getCommitHash } = require('./scripts/gitInfo');
/** @type {import('next').NextConfig} */
const nextConfig = withTM({
productionBrowserSourceMaps: true,
reactStrictMode: true,
swcMinify: false,
publicRuntimeConfig: {
NODE_ENV: process.env.NODE_ENV,
PROJECT_NAME: process.env.npm_package_name,
BUILD_DATE: new Date().toISOString(),
CI: process.env.CI || null,
VERSION: getGitVersion(),
COMMIT_HASH: getCommitHash(),
},
});
module.exports = nextConfig;