Skip to content

Commit

Permalink
fix(gatsby-cli): Resolve babel preset ts explicitly (#35153)
Browse files Browse the repository at this point in the history
  • Loading branch information
tyhopp authored Mar 17, 2022
1 parent 16cff41 commit 30ecc7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/gatsby-cli/src/handlers/plugin-add-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const addPluginToConfig = (

// Use the Babel TS preset if we're operating on `gatsby-config.ts`
if (srcPath.endsWith(`ts`)) {
transformOptions.presets = [`@babel/preset-typescript`]
transformOptions.presets = [require.resolve(`@babel/preset-typescript`)]
}

code = transform(src, transformOptions)?.code
Expand Down

0 comments on commit 30ecc7d

Please sign in to comment.