Skip to content

Commit 558059f

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 3a637c0 commit 558059f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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.

0 commit comments

Comments
 (0)