Skip to content

Commit

Permalink
Really disable postBuild extension
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleAMathews committed Sep 28, 2016
1 parent 591bb9a commit 94581a9
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lib/utils/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ import { pagesDB } from './globals'
function customPost (program, callback) {
const directory = program.directory
let customPostBuild
try {
// $FlowIssue - https://github.com/facebook/flow/issues/1975
const gatsbyNodeConfig = require(`${directory}/gatsby-node`)
customPostBuild = gatsbyNodeConfig.postBuild
} catch (e) {
if (e.code !== `MODULE_NOT_FOUND` && !_.includes(e.Error, `gatsby-node`)) {
console.log(`Failed to load gatsby-node.js, skipping custom post build script`, e)
}
}
//try {
//// $FlowIssue - https://github.com/facebook/flow/issues/1975
//const gatsbyNodeConfig = require(`${directory}/gatsby-node`)
//customPostBuild = gatsbyNodeConfig.postBuild
//} catch (e) {
//if (e.code !== `MODULE_NOT_FOUND` && !_.includes(e.Error, `gatsby-node`)) {
//console.log(`Failed to load gatsby-node.js, skipping custom post build script`, e)
//}
//}

if (customPostBuild) {
console.log(`Performing custom post-build steps`)
Expand Down

0 comments on commit 94581a9

Please sign in to comment.