Skip to content

Commit

Permalink
fix(gatsby-cli): Resolve babel preset ts explicitly (#35153) (#35167)
Browse files Browse the repository at this point in the history
Co-authored-by: Ty Hopp <tyhopp@users.noreply.github.com>
Co-authored-by: Michal Piechowiak <misiek.piechowiak@gmail.com>
  • Loading branch information
3 people committed Mar 18, 2022
1 parent 24b9fde commit 0f2ec73
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 23 deletions.
2 changes: 1 addition & 1 deletion packages/gatsby-cli/src/handlers/plugin-add-utils.ts
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
23 changes: 1 addition & 22 deletions yarn.lock
Expand Up @@ -11407,27 +11407,6 @@ gather-stream@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/gather-stream/-/gather-stream-1.0.0.tgz#b33994af457a8115700d410f317733cbe7a0904b"

gatsby-core-utils@^3.8.2:
version "3.8.2"
resolved "https://registry.yarnpkg.com/gatsby-core-utils/-/gatsby-core-utils-3.8.2.tgz#9c2869f93a740d20536b1e92c8020efd85d43e5f"
integrity sha512-UwANr9yd8ayLinPDoRbU/rRgoOBOS715qe2LYCxq6hAtRabHWTEM8Vj0wh7LmyVGexx8MFgvp2NKikG2TZ5pzQ==
dependencies:
"@babel/runtime" "^7.15.4"
ci-info "2.0.0"
configstore "^5.0.1"
fastq "^1.13.0"
file-type "^16.5.3"
fs-extra "^10.0.0"
got "^11.8.3"
import-from "^4.0.0"
lmdb "^2.1.7"
lock "^1.1.0"
node-object-hash "^2.3.10"
proper-lockfile "^4.1.2"
resolve-from "^5.0.0"
tmp "^0.2.1"
xdg-basedir "^4.0.0"

gauge@~2.7.3:
version "2.7.4"
resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7"
Expand Down Expand Up @@ -15177,7 +15156,7 @@ livereload-js@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/livereload-js/-/livereload-js-2.3.0.tgz#c3ab22e8aaf5bf3505d80d098cbad67726548c9a"

lmdb@^2.0.2, lmdb@^2.1.7, lmdb@^2.2.3, lmdb@^2.2.4:
lmdb@^2.0.2, lmdb@^2.2.3, lmdb@^2.2.4:
version "2.2.4"
resolved "https://registry.yarnpkg.com/lmdb/-/lmdb-2.2.4.tgz#6494d5a1d1db152e0be759edcfa06893e4cbdb53"
integrity sha512-gto+BB2uEob8qRiTlOq+R3uX0YNHsX9mjxj9Sbdue/LIKqu6IlZjrsjKeGyOMquc/474GEqFyX2pdytpydp0rQ==
Expand Down

0 comments on commit 0f2ec73

Please sign in to comment.