diff --git a/packages/cli/lib/lib/babel-config.js b/packages/cli/lib/lib/babel-config.js
index <HASH>..<HASH> 100644
--- a/packages/cli/lib/lib/babel-config.js
+++ b/packages/cli/lib/lib/babel-config.js
@@ -36,7 +36,7 @@ module.exports = function (env, options = {}) {
 		overrides: [
 			// Transforms to apply only to first-party code:
 			{
-				exclude: /node_modules/,
+				exclude: '**/node_modules/**',
 				presets: [
 					[require.resolve('@babel/preset-typescript'), { jsxPragma: 'h' }],
 				],
Update packages/cli/lib/lib/babel-config.js