Skip to content

Commit

Permalink
fix: new version of @netlify/build
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Dec 20, 2021
1 parent 48934f2 commit 3061f38
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/build.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @ts-check
const build = require('@netlify/build')
const netlifyBuildPromise = import('@netlify/build')

/**
* The buildConfig + a missing cachedConfig
Expand Down Expand Up @@ -39,6 +39,7 @@ const getBuildOptions = ({ cachedConfig, options: { debug, dry, json, offline, s
* @returns
*/
const runBuild = async (options) => {
const { default: build } = await netlifyBuildPromise
const { configMutations, netlifyConfig: newConfig, severityCode: exitCode } = await build(options)
return { exitCode, newConfig, configMutations }
}
Expand Down

0 comments on commit 3061f38

Please sign in to comment.