mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-15 18:13:38 +08:00
fix(@schematics/angular): use app root to set server paths in options
This commit is contained in:
parent
d07e68aa95
commit
432fe97d89
@ -536,8 +536,8 @@ function extractProjectsConfig(
|
||||
if (serverApp) {
|
||||
const serverOptions: JsonObject = {
|
||||
outputPath: serverApp.outDir || defaults.serverOutDir,
|
||||
main: serverApp.main || defaults.serverMain,
|
||||
tsConfig: serverApp.tsconfig || defaults.serverTsConfig,
|
||||
main: `${appRoot}/${serverApp.main || defaults.serverMain}`,
|
||||
tsConfig: `${appRoot}/${serverApp.tsconfig || defaults.serverTsConfig}`,
|
||||
};
|
||||
const serverTarget: JsonObject = {
|
||||
builder: '@angular-devkit/build-angular:server',
|
||||
|
@ -992,8 +992,8 @@ describe('Migration to v6', () => {
|
||||
expect(target).toBeDefined();
|
||||
expect(target.builder).toEqual('@angular-devkit/build-angular:server');
|
||||
expect(target.options.outputPath).toEqual('dist/server');
|
||||
expect(target.options.main).toEqual('main.server.ts');
|
||||
expect(target.options.tsConfig).toEqual('tsconfig.server.json');
|
||||
expect(target.options.main).toEqual('src/main.server.ts');
|
||||
expect(target.options.tsConfig).toEqual('src/tsconfig.server.json');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user