Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6c7b798

Browse files
committed
fix(@schematics/angular): directly resolve karma config template in migration
To attempt to workaround Windows pathing issues in the karma configuration migration, the default karma template is now resolved via `require.resolve`.
1 parent a1ef96b commit 6c7b798

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

‎packages/schematics/angular/migrations/karma/karma-config-comparer.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export async function generateDefaultKarmaConfig(
4141
projectName: string,
4242
needDevkitPlugin: boolean,
4343
): Promise<string> {
44-
const templatePath = path.join(__dirname,'../../config/files/karma.conf.js.template');
44+
const templatePath = require.resolve('../../config/files/karma.conf.js.template');
4545
let template = await readFile(templatePath, 'utf-8');
4646

4747
// TODO: Replace this with the actual schematic templating logic.

‎packages/schematics/angular/migrations/migration-collection.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"encapsulation": false,
23
"schematics": {
34
"use-application-builder": {
45
"version": "21.0.0",

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /