diff --git a/packages/custom-esbuild/src/schemes.ts b/packages/custom-esbuild/src/schemes.ts index 1da046b5f8..05857e910b 100644 --- a/packages/custom-esbuild/src/schemes.ts +++ b/packages/custom-esbuild/src/schemes.ts @@ -1,13 +1,18 @@ -// Base schemes from build-angular@0.1202.7 +import * as path from 'node:path'; + module.exports = [ { - originalSchemaPath: '@angular-devkit/build-angular/src/builders/application/schema.json', - schemaExtensionPaths: [`${__dirname}/application/schema.ext.json`], - newSchemaPath: `${__dirname}/../dist/application/schema.json`, + originalSchemaPath: require.resolve( + '@angular-devkit/build-angular/src/builders/application/schema.json' + ), + schemaExtensionPaths: [path.join(__dirname, 'application/schema.ext.json')], + newSchemaPath: path.resolve(__dirname, '../dist/application/schema.json'), }, { - originalSchemaPath: '@angular-devkit/build-angular/src/builders/dev-server/schema.json', - schemaExtensionPaths: [`${__dirname}/dev-server/schema.ext.json`], - newSchemaPath: `${__dirname}/../dist/dev-server/schema.json`, + originalSchemaPath: require.resolve( + '@angular-devkit/build-angular/src/builders/dev-server/schema.json' + ), + schemaExtensionPaths: [path.join(__dirname, 'dev-server/schema.ext.json')], + newSchemaPath: path.resolve(__dirname, '../dist/dev-server/schema.json'), }, ];