dsql-admin/dsql-app/postbuild.js

27 lines
602 B
JavaScript
Raw Permalink Normal View History

2024-11-05 11:12:42 +00:00
// @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);
}