Skip to content

Commit 68aaea6

Browse files
committed
refactor: resolve schema from custom-esbuild because root version may differ
1 parent 48f4756 commit 68aaea6

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed
Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
1-
// Base schemes from [email protected]
1+
import * as path from 'node:path';
2+
23
module.exports = [
34
{
4-
originalSchemaPath: '@angular-devkit/build-angular/src/builders/application/schema.json',
5-
schemaExtensionPaths: [`${__dirname}/application/schema.ext.json`],
6-
newSchemaPath: `${__dirname}/../dist/application/schema.json`,
5+
originalSchemaPath: require.resolve(
6+
'@angular-devkit/build-angular/src/builders/application/schema.json'
7+
),
8+
schemaExtensionPaths: [path.join(__dirname, 'application/schema.ext.json')],
9+
newSchemaPath: path.resolve(__dirname, '../dist/application/schema.json'),
710
},
811
{
9-
originalSchemaPath: '@angular-devkit/build-angular/src/builders/dev-server/schema.json',
10-
schemaExtensionPaths: [`${__dirname}/dev-server/schema.ext.json`],
11-
newSchemaPath: `${__dirname}/../dist/dev-server/schema.json`,
12+
originalSchemaPath: require.resolve(
13+
'@angular-devkit/build-angular/src/builders/dev-server/schema.json'
14+
),
15+
schemaExtensionPaths: [path.join(__dirname, 'dev-server/schema.ext.json')],
16+
newSchemaPath: path.resolve(__dirname, '../dist/dev-server/schema.json'),
1217
},
1318
];

0 commit comments

Comments
 (0)