Skip to content

Commit 0f2ec73

Browse files
gatsbybottyhopppieh
authored
fix(gatsby-cli): Resolve babel preset ts explicitly (#35153) (#35167)
Co-authored-by: Ty Hopp <[email protected]> Co-authored-by: Michal Piechowiak <[email protected]>
1 parent 24b9fde commit 0f2ec73

File tree

2 files changed

+2
-23
lines changed

2 files changed

+2
-23
lines changed

packages/gatsby-cli/src/handlers/plugin-add-utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const addPluginToConfig = (
4343

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

4949
code = transform(src, transformOptions)?.code

yarn.lock

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11407,27 +11407,6 @@ gather-stream@^1.0.0:
1140711407
version "1.0.0"
1140811408
resolved "https://registry.yarnpkg.com/gather-stream/-/gather-stream-1.0.0.tgz#b33994af457a8115700d410f317733cbe7a0904b"
1140911409

11410-
gatsby-core-utils@^3.8.2:
11411-
version "3.8.2"
11412-
resolved "https://registry.yarnpkg.com/gatsby-core-utils/-/gatsby-core-utils-3.8.2.tgz#9c2869f93a740d20536b1e92c8020efd85d43e5f"
11413-
integrity sha512-UwANr9yd8ayLinPDoRbU/rRgoOBOS715qe2LYCxq6hAtRabHWTEM8Vj0wh7LmyVGexx8MFgvp2NKikG2TZ5pzQ==
11414-
dependencies:
11415-
"@babel/runtime" "^7.15.4"
11416-
ci-info "2.0.0"
11417-
configstore "^5.0.1"
11418-
fastq "^1.13.0"
11419-
file-type "^16.5.3"
11420-
fs-extra "^10.0.0"
11421-
got "^11.8.3"
11422-
import-from "^4.0.0"
11423-
lmdb "^2.1.7"
11424-
lock "^1.1.0"
11425-
node-object-hash "^2.3.10"
11426-
proper-lockfile "^4.1.2"
11427-
resolve-from "^5.0.0"
11428-
tmp "^0.2.1"
11429-
xdg-basedir "^4.0.0"
11430-
1143111410
gauge@~2.7.3:
1143211411
version "2.7.4"
1143311412
resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7"
@@ -15177,7 +15156,7 @@ livereload-js@^2.3.0:
1517715156
version "2.3.0"
1517815157
resolved "https://registry.yarnpkg.com/livereload-js/-/livereload-js-2.3.0.tgz#c3ab22e8aaf5bf3505d80d098cbad67726548c9a"
1517915158

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

0 commit comments

Comments
 (0)