dsql-admin/dsql-app/postbuild.js
2024-11-05 12:12:42 +01:00

27 lines
602 B
JavaScript
Executable File

// @ts-check
const { spawnSync } = require("child_process");
console.log("Running Post build ...");
try {
/** @type {import('child_process').SpawnSyncOptionsWithStringEncoding} */
const spawnSyncOptions = {
stdio: "inherit",
encoding: "utf-8",
cwd: process.cwd(),
env: {
...process.env,
NODE_ENV: "production",
},
};
const generateSitemap = spawnSync(
"npx",
["next-sitemap"],
spawnSyncOptions
);
} catch (error) {
console.log("Post Build Error =>", error);
}