mirror of
https://github.com/strapi/strapi.git
synced 2025-08-19 06:08:50 +00:00
Avoid write files if not development environment
This commit is contained in:
parent
1233d5fac9
commit
a5dc07c0a5
@ -266,8 +266,10 @@ module.exports = {
|
||||
resolvers,
|
||||
});
|
||||
|
||||
if (strapi.config.environment === 'development') {
|
||||
// Write schema.
|
||||
this.writeGenerateSchema(graphql.printSchema(schema));
|
||||
}
|
||||
|
||||
// Remove custom scaler (like Upload);
|
||||
typeDefs = Types.removeCustomScalar(typeDefs, resolvers);
|
||||
|
@ -88,6 +88,10 @@ module.exports = async function() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (strapi.config.environment !== 'development') {
|
||||
return;
|
||||
}
|
||||
|
||||
// arrange system directories
|
||||
await Promise.all([
|
||||
fs.remove(sourcePath),
|
||||
|
Loading…
x
Reference in New Issue
Block a user