refactor: adopt Turbopack as default bundler#17906
Draft
pettinarip wants to merge 8 commits intorefactor/tailwind-v4-migrationfrom
Draft
refactor: adopt Turbopack as default bundler#17906pettinarip wants to merge 8 commits intorefactor/tailwind-v4-migrationfrom
pettinarip wants to merge 8 commits intorefactor/tailwind-v4-migrationfrom
Conversation
ed78066 to
d61e4e6
Compare
Run npx storybook@9 upgrade with automigrations: - upgrade-storybook-related-dependencies - initial-globals (globals → initialGlobals) - consolidated-imports (@storybook/* → storybook/*) - remove-addon-interactions (moved to core) - renderer-to-framework (@storybook/react → @storybook/nextjs) - remove-essential-addons (replaced with @storybook/addon-docs) - remove-docs-autodocs (deprecated config removed)
Run npx storybook@latest upgrade with automigrations: - addon-globals-api (viewport/backgrounds configuration) - nextjs-to-nextjs-vite (reverted - staying on webpack per plan) Reverted the automatic nextjs-vite migration: replaced @storybook/nextjs-vite with @storybook/nextjs across all files to keep the webpack-based framework as intended.
- Remove @next/bundle-analyzer and withBundleAnalyzer wrapper - Swap scripts: dev/build now use Turbopack (default in Next.js 16), dev:webpack/build:webpack available as fallbacks - Replace .all-contributorsrc symlink with JSON copy for Turbopack module resolution compatibility - Add turbopackIgnore comment for dynamic path.join in rehypeImg.ts - Both `pnpm build` (Turbopack) and `pnpm build:webpack` pass
turbopackIgnore is a magic comment that only works inside dynamic import() or require() expressions. Placing it inside path.join(), readFile(), or existsSync() calls has no effect on Turbopack's module tracing.
Dynamic import() with variable paths caused Turbopack to trace 143k+ markdown files across all locales. fs.readFile() is invisible to Turbopack's module graph analysis, matching the pattern already used in import.ts.
a0d6df0 to
4ea54fc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--webpackflag fromdevandbuildscripts — Turbopack is now the default bundler@next/bundle-analyzer(webpack-only, inert under Turbopack)!!raw-loader!import in Contributors with standard JSON importimport()→fs.readFile()for tutorial markdown, file-tracing suppression, Sentry debug logging cleanupKeeps
build:webpackanddev:webpackas fallback scripts.Stack
refactor/tailwind-v4-migration(PR refactor: migrate Tailwind CSS v3 to v4 with CSS-first config #17905)refactor/storybook-10-upgrade-webpack(PR refactor: upgrade Storybook 8.6 to 10.3 with webpack #17900)Test plan
pnpm devstarts with Turbopack (no--webpack)pnpm buildsucceeds with Turbopackpnpm build:webpackstill works as fallbackpnpm build-storybooksucceeds