Turbopack build feedback #77721
Replies: 72 comments 97 replies
-
|
when creating a standalone build and starting with just |
Beta Was this translation helpful? Give feedback.
-
|
why does with running however, running |
Beta Was this translation helpful? Give feedback.
-
|
turbopack build does not correctly resolve fonts from next/font - #77861 |
Beta Was this translation helpful? Give feedback.
-
|
next build --turbo with nextjs 15.3.0 generates chunks with invalid filenames on Windows. |
Beta Was this translation helpful? Give feedback.
-
import jackson from "@/server/services/jackson";
import { redirect } from "next/navigation";
export async function POST(req: Request) {
const { oauthController } = await jackson();
const formData = await req.formData();
const { redirect_url } = await oauthController.samlResponse({
RelayState: formData.get("RelayState") as string,
SAMLResponse: formData.get("SAMLResponse") as string,
});
redirect(redirect_url as string);
}import { clientEnv } from "@/env/client";
import { createUrl } from "@/lib/utils";
import jackson, {
type IConnectionAPIController,
type IDirectorySyncController,
type IOAuthController,
type ISPSSOConfig,
type JacksonOption,
type OIDCAuthzResponsePayload,
} from "@boxyhq/saml-jackson";
import config from "../db/config";
export type { OIDCAuthzResponsePayload };
interface Global {
apiController?: IConnectionAPIController;
oauthController?: IOAuthController;
directorySync?: IDirectorySyncController;
spConfig?: ISPSSOConfig;
}
const g: Global = global as unknown as Global;
const externalUrl = createUrl.subdomain("admin-cms").path();
const opts: JacksonOption = {
externalUrl: externalUrl,
samlAudience: clientEnv.NEXT_PUBLIC_APP_NAME,
samlPath: "/api/sso/acs",
oidcPath: "/api/sso/callback",
db: {
engine: "sql",
type: "mysql",
url: config.primary,
},
openid: {},
noAnalytics: true,
};
let apiController: IConnectionAPIController;
let oauthController: IOAuthController;
let directorySync: IDirectorySyncController;
let spConfig: ISPSSOConfig;
export default async function init() {
if (
!g.apiController ||
!g.oauthController ||
!g.directorySync ||
!g.spConfig
) {
const ret = await jackson(opts);
apiController = ret.apiController;
oauthController = ret.oauthController;
directorySync = ret.directorySyncController;
spConfig = ret.spConfig;
g.apiController = apiController;
g.oauthController = oauthController;
g.directorySync = directorySync;
g.spConfig = spConfig;
} else {
apiController = g.apiController;
oauthController = g.oauthController;
directorySync = g.directorySync;
spConfig = g.spConfig;
}
return {
apiController,
oauthController,
directorySync,
spConfig,
};
} |
Beta Was this translation helpful? Give feedback.
-
|
We are from LobeHub Team and building LobeChat with nextjs. I have tested the building with turbopack now and It's amazing fast!
And Here is a compare of webpack and turbopack:
You can see turbopack reduce 60% building time! But there still an issue with integate with serwist: serwist/serwist#54 . Can wait to move to turbopack after this integration! |
Beta Was this translation helpful? Give feedback.
-
|
Turbo build production fails with Prisma (tried on both 6.5.0 and 6.6.0 using the prisma-client-js generator): prisma schema folder structure prisma loaded in the frontend like this builds all ok without the turbo flag, and next dev --turbo also works fine |
Beta Was this translation helpful? Give feedback.
-
Build Performance Comparison
|
Beta Was this translation helpful? Give feedback.
-
|
خیلیییی سریعه 🔥🔥 |
Beta Was this translation helpful? Give feedback.
-
|
I with my small project don't see any performance benefits. Are we only supposed to see the benefits in bigger projects? I have even tried running the build command multiple times to see if i would get better results without any luck. I ran each of these with a clean build first. Hardware: running without > next build
▲ Next.js 15.3.0
- Experiments (use with caution):
✓ useCache
Creating an optimized production build ...
✓ Compiled successfully in 1000ms
✓ Linting and checking validity of types
✓ Collecting page data
✓ Generating static pages (6/6)
✓ Collecting build traces
✓ Finalizing page optimization
Route (app) Size First Load JS
┌ ƒ / 572 B 372 kB
├ ƒ /_not-found 990 B 105 kB
└ ƒ /login 572 B 372 kB
+ First Load JS shared by all 104 kB
├ chunks/1684-3cc8d39bf08bda7e.js 46.4 kB
├ chunks/4bd1b696-79901f1c062801da.js 53.2 kB
└ other shared chunks (total) 4.83 kB
ƒ Middleware 33.3 kB
ƒ (Dynamic) server-rendered on demand
npm run build 15.84s user 2.25s system 183% cpu 9.886 totalrunning with > next build --turbopack
⚠ The config property `experimental.turbo` is deprecated. Move this setting to `config.turbopack` as Turbopack is now stable.
▲ Next.js 15.3.0 (Turbopack)
- Experiments (use with caution):
· turbo
✓ useCache
Creating an optimized production build ...
✓ Compiled successfully in 2.9s
✓ Linting and checking validity of types
✓ Collecting page data
✓ Generating static pages (6/6)
✓ Collecting build traces
✓ Finalizing page optimization
Route (app) Size First Load JS
┌ ƒ / 0 B 420 kB
├ ƒ /_not-found 0 B 420 kB
└ ƒ /login 0 B 420 kB
+ First Load JS shared by all 422 kB
├ chunks/1fa3394cc56fb597.js 77.1 kB
├ chunks/780cf8f2a2a5b7ec.js 13.1 kB
├ chunks/7e8ef395dd44ad63.js 270 kB
├ chunks/e694e57256351634.js 18.9 kB
└ other shared chunks (total) 42.9 kB
ƒ Middleware 50.5 kB
ƒ (Dynamic) server-rendered on demand
⚠ Support for Turbopack builds is experimental. We don't recommend deploying mission-critical applications to production.
- Turbopack currently always builds production sourcemaps for the browser. This will include project sourcecode if deployed to production.
- It is expected that your bundle size might be different from `next build` with webpack. This will be improved as we work towards stability.
- This build is without disk caching; subsequent builds will become faster when disk caching becomes available.
- When comparing output to webpack builds, make sure to first clear the Next.js cache by deleting the `.next` directory.
Provide feedback for Turbopack builds at https://github.com/vercel/next.js/discussions/77721
npm run build 22.58s user 3.21s system 237% cpu 10.879 total |
Beta Was this translation helpful? Give feedback.
-
|
Probably some unhandled cases in
After investigating the reason, it is because dynamic imports in a route handler that referenced client components |
Beta Was this translation helpful? Give feedback.
-
|
It is a vast improvement from webpack. In Webpack it takes 10 mins to compile and with |
Beta Was this translation helpful? Give feedback.
-
|
Using Turbo with Reproduction: https://github.com/remcohaszing/turbo-markdown-error |
Beta Was this translation helpful? Give feedback.
-
|
Can we turn off Source maps manually? |
Beta Was this translation helpful? Give feedback.
-
|
We ran into two problems which directly crash the build (15.3.1-canary.8) Turbopack crashes with SWC plugins when using absolute paths in swcPlugins configuration #78156 SWC plugin context in Turbopack includes only basename instead of full path #78181 |
Beta Was this translation helpful? Give feedback.
-
|
I had to disable turbopack because I had hydration errors due to Emotion (emotion-js/emotion#3308). Sometimes the pages are loaded correctly, sometimes the hydration error occurs and I have to refresh the page multiple times until it can render the page without errors, which was very frustrating, so I disabled turbopack for now. |
Beta Was this translation helpful? Give feedback.
-
|
If I add it to the |
Beta Was this translation helpful? Give feedback.
-
|
Here is my first-load JS being almost doubled with turbopack. I don't want to publicize my route tree, but can provide more details in private. |
Beta Was this translation helpful? Give feedback.
-
|
adobe's |
Beta Was this translation helpful? Give feedback.
-
|
would love if have plugin to analyze the bundle size like @next/bundle-analyzer for webpack build |
Beta Was this translation helpful? Give feedback.
-
|
I was using nextjs Have been using google fonts with below url, imported through an scss file. but this URL was not included in my css file when I checked network request's css file that's why my site's fonts were not loading.
Tried multiple versions of sass but it turned out that it wasn't an issue, but as soon as I removed |
Beta Was this translation helpful? Give feedback.
-
|
We've started seeing a lot of errors like the below in Sentry, after using turbopack in production Which seems to be identical to #82651 |
Beta Was this translation helpful? Give feedback.
-
|
I have a use case where i need to generate deterministic CSS module classnames. This was possible with webpack system on next, but doesn't appear to be exposed in lightning css options via turbopack. Is there something I'm missing? Thanks |
Beta Was this translation helpful? Give feedback.
-
|
Question for a topic from June about generated pages chunks filenames are not unique between builds. Original comment here: #77721 (comment)
Is this list available somewhere? To be honest - I was observing the https://areweturboyet.com/ - it is saying that turbo is production-ready. But looks like it is very misleading - this production ready is about passed unit-tests, not that whole turbopack build is production ready. We were testing it on our staging environments for a month, and we had huge problems with cached pages chunks. The problem is also happening on dev mode - but usually devs are spamming hard-refresh so it could be easily missed. My point is - clearly (as offical docs says) turbopack production build is not yet production ready - but i could not find any list of features/bugs crucial to be updated before going production. Nonetheless, very thanks for your hardwork! Turbopack results are awesome and I can't wait to reduce our build time to seconds instead of minutes :D |
Beta Was this translation helpful? Give feedback.
-
|
Is anyone having trouble with JSDom (or isomorphic-dompurify), when deploying to Vercel? thrown from here: I assume something has decided not to provide that file to the deployment or something? |
Beta Was this translation helpful? Give feedback.
-
|
Upgrading from 15.5.4 to 16. Having that issue on 2 apps in a monorepo with turbo. Another app without turbo not throwing the error. |
Beta Was this translation helpful? Give feedback.
-
|
As already stated in the closed issues #42651 missing Yarn PnP support. |
Beta Was this translation helpful? Give feedback.
-
|
We've been trying to update to Next 16 and switch to turbopack but I get this error with scss modules on my Windows 11 machine - my colleague on a mac can run the app with no issues. For reference, we're using
As I said before, my colleague with the same code on a mac can run the app with no problems using turbopack. I can run the app fine when I do Our Note: I've obfuscated some of the naming above with |
Beta Was this translation helpful? Give feedback.
-
|
Turbopack is nearly twice as slow as Webpack during It is particularly slow when creating an optimized production build. The build times are as follows:
These times reflect only the build process in Docker and do not include other Docker build processes. When running the build outside of Docker, the results are as follows:
I am using Orbstack with no limits on CPU and RAM. These tests are conducted on an M4 Pro with a 14-core CPU. FROM node:22-alpine AS base
# System dependencies
FROM base AS base-runtime
RUN apk add --no-cache libc6-compat curl bash && \
curl -fsSL https://bun.sh/install | bash
ENV PATH="/root/.bun/bin:${PATH}"
# Stage 1: Install application dependencies
FROM base-runtime AS deps
WORKDIR /app
COPY package.json bun.lockb* ./
RUN bun install --frozen-lockfile
# Stage 2: Build application
FROM base-runtime AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN bun run build --webpack
# Stage 3: Production runtime
FROM base-runtime AS runner
WORKDIR /app
RUN addgroup --system --gid 1001 nodejs && \
adduser --system --uid 1001 nextjs && \
mkdir -p .next \
public && \
chown nextjs:nodejs .next
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/public ./public
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
RUN chown -R nextjs:nodejs /app
USER nextjs
EXPOSE 3000
ENV PORT=3000 \
HOSTNAME="0.0.0.0"
CMD ["node", "server.js"] |
Beta Was this translation helpful? Give feedback.
-
|
Have an issue only with vercel during build and turbopack: Error evaluating Node.js code
|
Beta Was this translation helpful? Give feedback.








Uh oh!
There was an error while loading. Please reload this page.
-
Thread for posting feedback about
next build --turbopack.Beta Was this translation helpful? Give feedback.
All reactions