@strapi/strapi
Version:
An open source headless CMS solution to create and manage your own API. It provides a powerful dashboard and features to make your life easier. Databases supported: MySQL, MariaDB, PostgreSQL, SQLite
16 lines (13 loc) • 691 B
JavaScript
import { resolveProductionConfig, mergeConfigWithUserConfig } from './config.mjs';
const build = async (ctx)=>{
const config = await resolveProductionConfig(ctx);
const finalConfig = await mergeConfigWithUserConfig(config, ctx);
// Imported dynamically so this file's CJS build resolves Vite's ESM Node API instead of
// its CJS entry, which emits "The CJS build of Vite's Node API is deprecated".
// https://vite.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated
const { build: viteBuild } = await import('vite');
ctx.logger.debug('Vite config', finalConfig);
await viteBuild(finalConfig);
};
export { build };
//# sourceMappingURL=build.mjs.map