-
Notifications
You must be signed in to change notification settings - Fork 12k
perf(@angular-devkit/build-angular): enable opt-in usage of file system cache #20756
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
packages/angular_devkit/build_angular/src/webpack/utils/stats.ts
Outdated
Show resolved
Hide resolved
packages/angular_devkit/build_angular/src/webpack/configs/common.ts
Outdated
Show resolved
Hide resolved
packages/angular_devkit/build_angular/src/webpack/configs/common.ts
Outdated
Show resolved
Hide resolved
…em cache With this change we enable Webpack's filesystem cache, this important because `terser-webpack-plugin`, `css-minimizer-webpack-plugin` and `copy-webpack-plugin` all use Webpacks' caching API to avoid additional processing during the 2nd cold build. This changes causes `node_modules` to be treated as immutable. Webpack will avoid hashing and timestamping them, assume the version is unique and will use it as a snapshot. To opt-in using the experimental persistent build cache use the`NG_PERSISTENT_BUILD_CACHE` environment variable. ``` NG_PERSISTENT_BUILD_CACHE=1 ng serve ```
@alan-agius4 hi!, what do you think about support additional property in so that caching can be easily configured tsconfig.json {
"angularCompilerOptions": {
// ...
persistentBuildCache: true
}
} |
Hi @splincode, This is not really a compiler option, so
|
Can anyone confirm this will (potentially) improve |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
With this change we enable Webpack's filesystem cache, this important because
terser-webpack-plugin
,css-minimizer-webpack-plugin
andcopy-webpack-plugin
all use Webpacks' caching API to avoid additional processing during the 2nd build.This changes causes
node_modules
to be treated as immutable. Webpack will avoid hashing and timestamping them, assume the version is unique and will use it as a snapshot.To opt-in using the experimental persistent build cache use the
NG_PERSISTENT_BUILD_CACHE
environment variable.