mirror of
https://github.com/Kludex/awesome-fastapi-projects.git
synced 2024-11-30 15:31:07 +00:00
23 lines
530 B
JavaScript
23 lines
530 B
JavaScript
|
/** @type {import('next').NextConfig} */
|
||
|
|
||
|
const pkg = require("./package.json");
|
||
|
|
||
|
// starts a command line process to get the git hash
|
||
|
const commitHash = require("child_process")
|
||
|
.execSync('git log --pretty=format:"%h" -n1')
|
||
|
.toString()
|
||
|
.trim();
|
||
|
|
||
|
const nextConfig = {
|
||
|
output: "export",
|
||
|
basePath:
|
||
|
// TODO: Change to load from env variable
|
||
|
process.env.NODE_ENV === "production" ? "/awesome-fastapi-projects" : "",
|
||
|
env: {
|
||
|
commitHash,
|
||
|
frontendAppVersion: pkg.version,
|
||
|
},
|
||
|
};
|
||
|
|
||
|
module.exports = nextConfig;
|