Add telemetry for turbotrace (#42486)

Depends on https://github.com/vercel/next-telemetry/pull/93
This commit is contained in:
LongYinan 2022-11-05 01:56:02 +08:00 committed by GitHub
parent cf3bb583d9
commit 086d434039
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 0 deletions

View file

@ -2120,6 +2120,7 @@ export default async function getBaseWebpackConfig(
['swcRemoveConsole', !!config.compiler?.removeConsole],
['swcImportSource', !!jsConfig?.compilerOptions?.jsxImportSource],
['swcEmotion', !!config.compiler?.emotion],
['turbotrace', !!config.experimental.turbotrace],
SWCBinaryTarget,
].filter<[Feature, boolean]>(Boolean as any)
)

View file

@ -34,6 +34,7 @@ export type Feature =
| 'swcImportSource'
| 'swcEmotion'
| `swc/target/${SWC_TARGET_TRIPLE}`
| 'turbotrace'
interface FeatureUsage {
featureName: Feature
@ -88,6 +89,7 @@ const BUILD_FEATURES: Array<Feature> = [
'swc/target/x86_64-unknown-linux-musl',
'swc/target/aarch64-unknown-linux-musl',
'swc/target/aarch64-pc-windows-msvc',
'turbotrace',
]
const ELIMINATED_PACKAGES = new Set<string>()

View file

@ -149,6 +149,7 @@ export type EventBuildFeatureUsage = {
| 'swcImportSource'
| 'swcEmotion'
| `swc/target/${SWC_TARGET_TRIPLE}`
| 'turbotrace'
| 'build-lint'
invocationCount: number
}