Skip to content

Commit 4f05a0d

Browse files
danwulffjust-jeb
authored andcommitted
Update README.md
1 parent a4c82a4 commit 4f05a0d

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

packages/custom-webpack/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,30 @@ Builder options:
240240
}
241241
```
242242
243+
External `karma.conf.js` configuration:
244+
245+
Starting with Angular v20, generating an [external karma config](https://angular.dev/guide/testing#configuration) will cause tests to hang while utilizing `@angular-builders/custom-webpack:karma`.
246+
247+
Fix this by:
248+
- adding `'@angular-devkit/build-angular'` to the `frameworks` array
249+
- adding `'@angular-devkit/build-angular/plugins/karma'` to the `plugins` array
250+
251+
`karma.conf.js` example:
252+
```js
253+
module.exports = function (config) {
254+
config.set({
255+
basePath: '',
256+
frameworks: ['jasmine', '@angular-devkit/build-angular'],
257+
plugins: [
258+
require('karma-jasmine'),
259+
require('karma-chrome-launcher'),
260+
require('karma-jasmine-html-reporter'),
261+
require('karma-coverage'),
262+
require('@angular-devkit/build-angular/plugins/karma'),
263+
],
264+
// ...
265+
```
266+
243267
## Custom Webpack `extract-i18n`
244268
245269
Enhanced `@angular-devkit/build-angular:extract-i18n` builder that leverages the custom webpack builder to get webpack configuration.

0 commit comments

Comments
 (0)