fix(core): ensure project configuration is saved as standalone when workspace.json isn't present(#12823)
Project configuration should be saved as standalone when addProject is called on an ng cli workspace if worksapce.json isn't present.
This commit is contained in:
parent
6e97c6c2e5
commit
e1e188c84e
@ -507,6 +507,9 @@ export class NxScopedHost extends virtualFs.ScopedHost<any> {
|
||||
};
|
||||
const projects: [string, any][] = Object.entries(configToWrite.projects);
|
||||
for (const [project, projectConfig] of projects) {
|
||||
if (!workspaceFileName) {
|
||||
projectConfig.configFilePath ??= `${projectConfig.root}/project.json`;
|
||||
}
|
||||
if (projectConfig.configFilePath) {
|
||||
if (workspaceFileName && !isNewFormat) {
|
||||
throw new Error(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user