Replies: 5 comments
-
I'm having the same problem. I'm still waiting for the response from the maintainers. Anyway, here's a possible way, which is different from NX case, but can be the light for incremental builds with the help of an orchestrator, Turbopack/repo. |
Beta Was this translation helpful? Give feedback.
-
Hello, @belaczek! I'm having a hard time at trying to understand this incremental build feature too. That Angular + webpack-browser executor example got me really confused. Especially for the |
Beta Was this translation helpful? Give feedback.
-
I have same question with Next.js projects. By looking with-nx code (which wraps next.config.js ), buildLisFromsSource flag is used to get buildable lib's locaiton and saves to block-scoped variable (code). But this variable (dependencies) is never used after allocation. I don't understand much of NX's incremental build, but it seems like NX's nextjs build is not doing any meaningful action to support incremental build. Am i wrong? Does Nx supports incremental build in Next.js? Moreover, If Nx supports somewhat incremental build with Next.js, does it gives us faster build time? in with-nx , Nx forces to transpile buildable libs with Next.js's bundler (whitch is babel or swc based on user configuration to support pure-esm buildable libraris maybe? (code) By then, if Nx supports incremental build with Next.js, build speed is not going to be faster than normal build? |
Beta Was this translation helpful? Give feedback.
-
Anyone apply this for production |
Beta Was this translation helpful? Give feedback.
-
Couldn't find a way to get incremental builds in place either. Using Next.js and a bunch of TS and React libs. |
Beta Was this translation helpful? Give feedback.
-
Following is a write-up of my struggles adopting incremental build in our monorepo. There are a couple of questions for which I wasn't able to find an answer.
Our setup: NX monorepo with 2 react apps (powered by
@nrwl/webpack
executors) and 5 shared libraries (buildable using@nrwl/rollup
, some non-buildable).Now to issues I have experienced so far:
buildLibsFromSource: true
parameter, which does the trick.Is this all that has to be done to make the incremental build work?
buildLibsFromSource
param only exists on@nrwl/webpack:webpack
executor. How can I control this elsewhere, for example in@nrwl/rollup
or@nrwl/esbuild
?tsconfig
. This would be good to have mentioned in the documentation.I understand that the incremental build is achieved by swapping tsconfig paths to point to the built artifacts in the dist folder. However, it seems like these assets are still being processed again by
babel-loader
anyway. I'd rather expect them to be handled the same waynode_modules
are: bundled but not transpilled. Is that the wrong expectation? Or is there something else happening in the background?I hope it doesn't sound too negative. The goal of this post isn't to complain, but rather just to provide notes from real-life experience and hopefully get some answers.
Beta Was this translation helpful? Give feedback.
All reactions