-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(turbopack_ecmascript): support partial tsconfig for the transform #3995
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
9 Ignored Deployments
|
|
Benchmark for 6b964feClick to view benchmark
|
Benchmark for 1eae1dc
Click to view full benchmark
|
// Selectively picks up tsconfig.json values to construct | ||
// swc transform's stripconfig. It doesn't account .swcrc config currently. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copy paste comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh you're right 🤦
e96b04c
to
66b5c44
Compare
Benchmark for 489e4e3
Click to view full benchmark
|
66b5c44
to
ab55c9c
Compare
ab55c9c
to
6974cf8
Compare
Benchmark for 42bb845
Click to view full benchmark
|
#3995) Resolves WEB-667, WEB-659. This PR allows to specify partial tsconfig (specifically, `useDefineForClassFields` / legacy decorators for now) into ecmatransform. There are few tsconfig options affect to the runtime output of typescript need to be specified when performing transform, useDefineForClassFields is one of them. For now, PR attempts to fix `test/development/basic/define-class-fields.test.ts` / `test/development/basic/legacy-decorators.test.ts` by enabling one options. .swcrc is still not being honored in this changes.
let tsconfig = find_context_file(source.ident().path(), tsconfig()); | ||
let tsconfig = match *tsconfig.await? { | ||
FindContextFileResult::Found(path, _) => Some( | ||
read_tsconfigs( | ||
path.read(), | ||
SourceAssetVc::new(path).into(), | ||
node_cjs_resolve_options(path.root()), | ||
) | ||
.await?, | ||
), | ||
FindContextFileResult::NotFound(_) => None, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This causes a lot of errors in front as tsconfig in node_modules is read:
C:\Repos\front\apps\vercel-site\node_modules\.pnpm\@vercel+analytics@0.1.9-beta.3_react@18.2.0\node_modules\@vercel\analytics\tsconfig.json
An issue occurred while parsing a tsconfig.json file.
extends doesn't resolve correctly
A tsconfig shouldn't be read in parse
vercel/turborepo#3995) Resolves WEB-667, WEB-659. This PR allows to specify partial tsconfig (specifically, `useDefineForClassFields` / legacy decorators for now) into ecmatransform. There are few tsconfig options affect to the runtime output of typescript need to be specified when performing transform, useDefineForClassFields is one of them. For now, PR attempts to fix `test/development/basic/define-class-fields.test.ts` / `test/development/basic/legacy-decorators.test.ts` by enabling one options. .swcrc is still not being honored in this changes.
vercel/turborepo#3995) Resolves WEB-667, WEB-659. This PR allows to specify partial tsconfig (specifically, `useDefineForClassFields` / legacy decorators for now) into ecmatransform. There are few tsconfig options affect to the runtime output of typescript need to be specified when performing transform, useDefineForClassFields is one of them. For now, PR attempts to fix `test/development/basic/define-class-fields.test.ts` / `test/development/basic/legacy-decorators.test.ts` by enabling one options. .swcrc is still not being honored in this changes.
vercel/turborepo#3995) Resolves WEB-667, WEB-659. This PR allows to specify partial tsconfig (specifically, `useDefineForClassFields` / legacy decorators for now) into ecmatransform. There are few tsconfig options affect to the runtime output of typescript need to be specified when performing transform, useDefineForClassFields is one of them. For now, PR attempts to fix `test/development/basic/define-class-fields.test.ts` / `test/development/basic/legacy-decorators.test.ts` by enabling one options. .swcrc is still not being honored in this changes.
Resolves WEB-667, WEB-659.
This PR allows to specify partial tsconfig (specifically,
useDefineForClassFields
/ legacy decorators for now) into ecmatransform. There are few tsconfig options affect to the runtime output of typescript need to be specified when performing transform, useDefineForClassFields is one of them.For now, PR attempts to fix
test/development/basic/define-class-fields.test.ts
/test/development/basic/legacy-decorators.test.ts
by enabling one options. .swcrc is still not being honored in this changes.