Skip to content

Conversation

@wbinnssmith
Copy link
Member

For now, this can allow next.config.js to understand where it's been run and apply different options. We should probably have better compatibility in the future, which would make this unnecessary for this usecase.

Test Plan: Modified a next.config.js to change its behavior based on the presence of this option. Verified non-turbo case doesn't have this exposed.

@wbinnssmith wbinnssmith requested a review from a team as a code owner January 17, 2023 19:56
@vercel
Copy link
Contributor

vercel bot commented Jan 17, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
examples-basic-web 🔄 Building (Inspect) Jan 19, 2023 at 11:47PM (UTC)
examples-nonmonorepo 🔄 Building (Inspect) Jan 19, 2023 at 11:47PM (UTC)
turbo-site ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Jan 19, 2023 at 11:47PM (UTC)
7 Ignored Deployments
Name Status Preview Comments Updated
examples-cra-web ⬜️ Ignored (Inspect) Jan 19, 2023 at 11:47PM (UTC)
examples-designsystem-docs ⬜️ Ignored (Inspect) Jan 19, 2023 at 11:47PM (UTC)
examples-kitchensink-blog ⬜️ Ignored (Inspect) Jan 19, 2023 at 11:47PM (UTC)
examples-native-web ⬜️ Ignored (Inspect) Jan 19, 2023 at 11:47PM (UTC)
examples-svelte-web ⬜️ Ignored (Inspect) Jan 19, 2023 at 11:47PM (UTC)
examples-tailwind-web ⬜️ Ignored (Inspect) Jan 19, 2023 at 11:47PM (UTC)
turbo-vite-web ⬜️ Ignored (Inspect) Jan 19, 2023 at 11:47PM (UTC)

@github-actions
Copy link
Contributor

Benchmark for cdf3f81

Test Base PR % Significant %
bench_startup/Turbopack SSR/1000 modules 2139.75ms ± 6.06ms 2115.20ms ± 5.68ms -1.15% -0.05%
Click to view full benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 8954.11µs ± 62.01µs 8834.22µs ± 58.68µs -1.34%
bench_hmr_to_commit/Turbopack RCC/1000 modules 9127.83µs ± 71.29µs 9189.13µs ± 52.67µs +0.67%
bench_hmr_to_commit/Turbopack RSC/1000 modules 485.75ms ± 2.00ms 488.15ms ± 1.84ms +0.49%
bench_hmr_to_commit/Turbopack SSR/1000 modules 8954.39µs ± 63.04µs 8984.65µs ± 52.23µs +0.34%
bench_hmr_to_eval/Turbopack CSR/1000 modules 7832.91µs ± 84.83µs 7853.06µs ± 47.13µs +0.26%
bench_hmr_to_eval/Turbopack RCC/1000 modules 8081.17µs ± 75.68µs 7964.37µs ± 95.13µs -1.45%
bench_hmr_to_eval/Turbopack SSR/1000 modules 7970.90µs ± 56.73µs 7983.56µs ± 75.62µs +0.16%
bench_hydration/Turbopack RCC/1000 modules 3421.65ms ± 15.33ms 3422.42ms ± 12.16ms +0.02%
bench_hydration/Turbopack RSC/1000 modules 2936.70ms ± 11.86ms 2923.72ms ± 9.34ms -0.44%
bench_hydration/Turbopack SSR/1000 modules 2730.81ms ± 13.23ms 2741.76ms ± 10.33ms +0.40%
bench_startup/Turbopack CSR/1000 modules 1687.15ms ± 5.63ms 1692.25ms ± 6.74ms +0.30%
bench_startup/Turbopack RCC/1000 modules 2592.65ms ± 10.52ms 2615.28ms ± 12.03ms +0.87%
bench_startup/Turbopack RSC/1000 modules 2482.05ms ± 8.34ms 2474.01ms ± 4.24ms -0.32%
bench_startup/Turbopack SSR/1000 modules 2139.75ms ± 6.06ms 2115.20ms ± 5.68ms -1.15% -0.05%

@github-actions
Copy link
Contributor

github-actions bot commented Jan 17, 2023

🟢 CI successful 🟢

Thanks

@wbinnssmith wbinnssmith force-pushed the wbinnssmith/process-turbopack branch from 583e4b9 to 2b91689 Compare January 18, 2023 22:14
@github-actions
Copy link
Contributor

Benchmark for 3c7d9f2

Click to view benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 8090.95µs ± 35.69µs 8217.59µs ± 48.87µs +1.57%
bench_hmr_to_commit/Turbopack RCC/1000 modules 8449.09µs ± 55.15µs 8429.52µs ± 58.60µs -0.23%
bench_hmr_to_commit/Turbopack RSC/1000 modules 461.33ms ± 3.38ms 454.10ms ± 1.59ms -1.57%
bench_hmr_to_commit/Turbopack SSR/1000 modules 8306.69µs ± 56.84µs 8278.31µs ± 79.26µs -0.34%
bench_hmr_to_eval/Turbopack CSR/1000 modules 7208.53µs ± 46.25µs 7214.99µs ± 79.30µs +0.09%
bench_hmr_to_eval/Turbopack RCC/1000 modules 7323.77µs ± 46.21µs 7394.33µs ± 69.12µs +0.96%
bench_hmr_to_eval/Turbopack SSR/1000 modules 7302.30µs ± 45.99µs 7306.72µs ± 55.69µs +0.06%
bench_hydration/Turbopack RCC/1000 modules 3248.63ms ± 7.39ms 3213.48ms ± 10.20ms -1.08%
bench_hydration/Turbopack RSC/1000 modules 2745.17ms ± 8.05ms 2756.65ms ± 9.17ms +0.42%
bench_hydration/Turbopack SSR/1000 modules 2579.80ms ± 13.71ms 2550.23ms ± 9.50ms -1.15%
bench_startup/Turbopack CSR/1000 modules 1606.31ms ± 4.07ms 1600.52ms ± 6.15ms -0.36%
bench_startup/Turbopack RCC/1000 modules 2399.28ms ± 6.85ms 2412.96ms ± 7.09ms +0.57%
bench_startup/Turbopack RSC/1000 modules 2301.79ms ± 5.69ms 2312.60ms ± 9.75ms +0.47%
bench_startup/Turbopack SSR/1000 modules 1998.36ms ± 3.17ms 1991.24ms ± 5.47ms -0.36%

@github-actions
Copy link
Contributor

Benchmark for 8881be3

Click to view benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 8099.64µs ± 24.35µs 8152.40µs ± 61.28µs +0.65%
bench_hmr_to_commit/Turbopack RCC/1000 modules 8452.93µs ± 61.40µs 8437.86µs ± 57.62µs -0.18%
bench_hmr_to_commit/Turbopack RSC/1000 modules 460.19ms ± 1.13ms 456.66ms ± 1.04ms -0.77%
bench_hmr_to_commit/Turbopack SSR/1000 modules 8202.49µs ± 66.42µs 8210.07µs ± 39.03µs +0.09%
bench_hmr_to_eval/Turbopack CSR/1000 modules 7090.37µs ± 49.03µs 7253.15µs ± 48.77µs +2.30%
bench_hmr_to_eval/Turbopack RCC/1000 modules 7267.48µs ± 53.64µs 7362.78µs ± 44.87µs +1.31%
bench_hmr_to_eval/Turbopack SSR/1000 modules 7233.79µs ± 36.30µs 7196.02µs ± 50.35µs -0.52%
bench_hydration/Turbopack RCC/1000 modules 3294.52ms ± 11.81ms 3306.68ms ± 13.38ms +0.37%
bench_hydration/Turbopack RSC/1000 modules 2782.55ms ± 9.88ms 2785.72ms ± 7.81ms +0.11%
bench_hydration/Turbopack SSR/1000 modules 2638.41ms ± 8.34ms 2611.26ms ± 13.28ms -1.03%
bench_startup/Turbopack CSR/1000 modules 1613.26ms ± 3.35ms 1613.36ms ± 6.96ms +0.01%
bench_startup/Turbopack RCC/1000 modules 2459.13ms ± 8.98ms 2470.02ms ± 7.88ms +0.44%
bench_startup/Turbopack RSC/1000 modules 2363.11ms ± 9.00ms 2366.19ms ± 6.43ms +0.13%
bench_startup/Turbopack SSR/1000 modules 2032.26ms ± 6.56ms 2030.31ms ± 5.99ms -0.10%

Copy link
Member

@sokra sokra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need something compile-time evaluatable to shortcircut e. g. if(!process.turbopack) and skip resolving references in that block.
Sadly we are missing the infrastructure for that still. So this will be a bigger task

@sokra
Copy link
Member

sokra commented Mar 1, 2023

Was merged

@sokra sokra closed this Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants