build: activate Turbopack for dev and build#424
Conversation
…GLSL Turbopack officially supports raw-loader but not glslify-loader. The 5 shaders using #pragma glslify: require/export are flattened with the glslify CLI (which resolves + dedups the ashima noise helpers), so plain raw-loader can load every .glsl file. The now-inlined utils/value-remap and utils/basic-light are deleted.
Drop the --webpack flag from dev/build (Turbopack is the Next 16 default), simplify turbopack.rules to raw-loader only, and remove the now-dead webpack() loader function. Remove glslify-loader/glsl-noise/ glsl-constants; add postcss-import as an explicit dep so Turbopack's resolver doesn't rely on a transitive hoist. Tailwind v3 PostCSS chain verified working under Turbopack. AGENTS.md updated to match.
…urbopack The lockfile had postcss pinned at 8.0.0 (the first 8.x release, 2020). Turbopack's PostCSS transform silently no-ops plugins driven by that version — Tailwind's @tailwind/@apply/theme() directives passed through raw in both dev and production, with no error. Bumping to postcss@8.5.10 fixes it: verified in a worktree and the real tree, dev and build, that every CSS chunk now has zero raw directives and full expanded output (preflight, utilities, theme colors), confirmed visually in the browser. No Tailwind v3->v4 migration was needed — this was never a Turbopack/ Tailwind-v3 incompatibility.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
6113dbb
into
ignmandagaran/adopt-cache-components
Summary
Switches
dev/buildfrom webpack to Turbopack (the Next.js 16 default), stacked on top of #422. Removes the two blockers noted inAGENTS.md, and fixes an unrelated styling regression discovered along the way.Changes
refactor(shaders): flatten glslify pragmas so raw-loader alone loads GLSL— 5 of 24.glslfiles used#pragma glslify: require/export(not supported by Turbopack's loader). Flattened with the glslify CLI (correctly dedups the shared ashima noise helpers) and deleted the now-inlinedutils/value-remap.glsl+utils/basic-light.glsl.build: switch dev and build to Turbopack— drop--webpack, simplifyturbopack.rulestoraw-loaderonly, remove the deadwebpack()config function, dropglslify-loader/glsl-noise/glsl-constants, addpostcss-importas an explicit dependency.fix(deps): bump postcss off ancient 8.0.0 to restore Tailwind under Turbopack— the lockfile hadpostcsspinned at8.0.0(2020). Turbopack's PostCSS transform silently no-oped plugins driven by that version, so@tailwind/@apply/theme()shipped raw and unstyled in both dev and prod. Bumped to8.5.10. This — not a Tailwind v3/Turbopack incompatibility — is almost certainly what caused the original webpack revert.Verification
All three commits verified in a throwaway git worktree before being applied to the real tree:
next buildgreen under Turbopack,Cache Components enabled, route-table parity (no dynamic regressions)./labarcade), and every CSS chunk fully expands (zero raw@tailwind/@apply, full preflight/utilities/theme colors) with no visual regressions.Checklist
pnpm lintpasses