Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
env
)}.\nMake sure the directory ${yellow(
`./config/environments/${env}`
)} exists`
);
process.exit(1);
}
const serverConfig = await loadConfigFile(envConfigDir, 'server.+(js|json)');
const adminPath = _.get(serverConfig, 'admin.path', '/admin');
const adminBackend = _.get(serverConfig, 'admin.build.backend', '/');
console.log(`Building your admin UI with ${green(env)} configuration ...`);
return strapiAdmin
.build({
dir,
// front end build env is always production for now
env: 'production',
optimize: optimization,
options: {
backend: adminBackend,
publicPath: addSlash(adminPath),
},
})
.then(() => {
process.exit();
})
.catch(err => {
console.error(err);
process.exit(1);