1 2 3 4 5 6 7 8 9 10 11 12 13 14 15import type { NextConfig } from "next"; const isDev = process.argv.indexOf("dev") !== -1; const isBuild = process.argv.indexOf("build") !== -1; if (!process.env.VELITE_STARTED && (isDev || isBuild)) { process.env.VELITE_STARTED = "1"; import("velite").then((m) => m.build({ watch: isDev, clean: !isDev })); } const nextConfig: NextConfig = { /* config options here */ }; export default nextConfig;