chore: print build info

This commit is contained in:
lawvs
2022-11-03 18:50:27 +08:00
parent de77cabd59
commit 4171874767
4 changed files with 104 additions and 1 deletions

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;