Skip to content

Commit

Permalink
fix(@angular-devkit/build-angular): increase resilience of babel cach…
Browse files Browse the repository at this point in the history
…e identifier

This provides a default cache identifer to the babel loader that includes all internal options from the customized babel loader.
  • Loading branch information
clydin authored and alan-agius4 committed Feb 4, 2021
1 parent 3806903 commit ab5078d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,14 @@ export default custom<AngularCustomOptions>(() => {
const options: Record<string, unknown> = {
...baseOptions,
...loaderOptions,
cacheIdentifier: JSON.stringify({
buildAngular: require('../../package.json').version,
forceAsyncTransformation,
forceES5,
shouldLink,
baseOptions,
loaderOptions,
}),
};

// Skip babel processing if no actions are needed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -535,9 +535,6 @@ export function getCommonConfig(wco: WebpackConfigOptions): Configuration {
loader: require.resolve('../../babel/webpack-loader'),
options: {
cacheDirectory: findCachePath('babel-webpack'),
cacheIdentifier: JSON.stringify({
buildAngular: require('../../../package.json').version,
}),
scriptTarget: wco.scriptTarget,
},
},
Expand Down

0 comments on commit ab5078d

Please sign in to comment.