Build output caching does not work for `@nrwl/next:build` followed by `@nrwl/next:dev-server`
See original GitHub issueExpected Behavior
Running the @nrwl/next:build
command should cache build outputs, so that @nrwl/next:dev-server
does not need to build the app again.
Current Behavior
yarn nx run myapp:build:production
# observe: myapp is compiled
yarn nx run myapp:serve:production
# observe: myapp is compiled *again*
Failure Information (for bugs)
Steps to Reproduce
https://github.com/Yolk-HQ/nx-caching-issue-2429
Context
Please provide any relevant information about your setup:
@nrwl/angular : Not Found
@nrwl/cli : 8.12.2
@nrwl/cypress : 8.12.2
@nrwl/eslint-plugin-nx : Not Found
@nrwl/express : Not Found
@nrwl/jest : 8.12.2
@nrwl/linter : 8.12.2
@nrwl/nest : Not Found
@nrwl/next : 8.12.2
@nrwl/node : Not Found
@nrwl/react : 8.12.2
@nrwl/schematics : Not Found
@nrwl/tao : 8.12.2
@nrwl/web : 8.12.2
@nrwl/workspace : 8.12.2
typescript : 3.5.3
Issue Analytics
- State:
- Created 4 years ago
- Reactions:6
- Comments:8
Top Results From Across the Web
Build Cache - Gradle User Manual
The build cache works by storing (locally or remotely) build outputs and allowing builds ... A first feature using the build cache is...
Read more >Improve page rendering by configuring output caching
Configure page output cache settings at the site level , click Site Settings. Under Site Administration, click Site output cache. Under Anonymous Cache...
Read more >OutputCache attribute not working on .NET 7 API endpoint
Edit 2: If I move app.UseOutputCache() to the first place in Configure() it works, but the documentation says that it must be placed...
Read more >How Caching Works - Nx
If Nx doesn't find a corresponding computation hash, Nx runs the task, ... Captures stdout and stderr to make sure the replayed output...
Read more >Donut Output Caching in ASP.NET MVC 3 - DevTrends
Sounds easy...so what's the problem? Whilst ASP.NET MVC is built on top of the ASP.NET framework, it has some quite significant differences that...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi folks! This example shows a “workaround”: https://github.com/nrwl/nx-incremental-large-repo. Basically, you can only cache files written to disk. The example shows how to build libraries (write files to disk), and webpack (for linking and chunking). The example uses Angular but there is really nothing Angular-specific about it.
This isn’t ideal because relinking everything takes time, and isn’t really needed for development.
My plan is to for very large apps only use webpack for prod builds and have a simple dev server that can load compiled libs, concat them, and serve them. Google does it this way (just with closure instead of webpack).
Does it make sense?
Closing this issue.
Making this a better-supported use case is one of the priorities for H2 2020.