Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

fix(@angular-devkit/build-angular): remove build optimizer cache #984

Merged
merged 2 commits into from
May 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@
"ajv": "~6.4.0",
"autoprefixer": "^8.4.1",
"bootstrap": "^4.0.0",
"cache-loader": "^1.2.2",
"chalk": "~2.2.2",
"chokidar": "^2.0.3",
"circular-dependency-plugin": "^5.0.2",
Expand Down
1 change: 0 additions & 1 deletion packages/angular_devkit/build_angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"@ngtools/webpack": "0.0.0",
"ajv": "~6.4.0",
"autoprefixer": "^8.4.1",
"cache-loader": "^1.2.2",
"circular-dependency-plugin": "^5.0.2",
"clean-css": "^4.1.11",
"copy-webpack-plugin": "^4.5.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ const StatsPlugin = require('stats-webpack-plugin');
* require('raw-loader')
* require('url-loader')
* require('file-loader')
* require('cache-loader')
* require('@angular-devkit/build-optimizer')
*/

Expand Down Expand Up @@ -161,18 +160,8 @@ export function getCommonConfig(wco: WebpackConfigOptions) {

let buildOptimizerUseRule;
if (buildOptions.buildOptimizer) {
// Set the cache directory to the Build Optimizer dir, so that package updates will delete it.
const buildOptimizerDir = g['_DevKitIsLocal']
? nodeModules
: path.dirname(require.resolve('@angular-devkit/build-optimizer', { paths: [projectRoot] }));
const cacheDirectory = path.resolve(buildOptimizerDir, './.cache/');

buildOptimizerUseRule = {
use: [
{
loader: 'cache-loader',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also remove cache-loader from the dependencies, and comment above?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's still in the top level dependencies for devkit I think.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also done.

options: { cacheDirectory }
},
{
loader: buildOptimizerLoader,
options: { sourceMap: buildOptions.sourceMap }
Expand Down