Skip to content

Commit

Permalink
refactor(gatsby): unwrap span object
Browse files Browse the repository at this point in the history
  • Loading branch information
mottox2 committed Mar 7, 2020
1 parent 863d6d9 commit 346f5bc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
6 changes: 1 addition & 5 deletions packages/gatsby/src/commands/build-javascript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@ import { reportWebpackWarnings } from "../utils/webpack-error-utils"

export const buildProductionBundle = async (
program: IProgram,
{
parentSpan,
}: {
parentSpan: Span
}
parentSpan: Span
): Promise<webpack.Stats> => {
const { directory } = program

Expand Down
10 changes: 5 additions & 5 deletions packages/gatsby/src/commands/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,11 @@ module.exports = async function build(program: BuildArgs) {
{ parentSpan: buildSpan }
)
activity.start()
const stats = await buildProductionBundle(program, {
parentSpan: activity.span,
}).catch(err => {
activity.panic(structureWebpackErrors(`build-javascript`, err))
})
const stats = await buildProductionBundle(program, activity.span).catch(
err => {
activity.panic(structureWebpackErrors(`build-javascript`, err))
}
)
activity.end()

const workerPool = WorkerPool.create()
Expand Down

0 comments on commit 346f5bc

Please sign in to comment.