Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions lib/projectPreprocessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,12 @@ class ProjectPreprocessor {
return config.kind === "extension";
});

const projectClone = JSON.parse(JSON.stringify(project));
let projectStringified;
if (extensionConfigs.length) {
// Stringify the project before making modifications
// Using a string to efficiently create multiple independent clones
projectStringified = JSON.stringify(project);
}

// While a project can contain multiple configurations,
// from a dependency tree perspective it is always a single project
Expand All @@ -255,7 +260,7 @@ class ProjectPreprocessor {

const extensionProjects = extensionConfigs.map((config) => {
// Clone original project
const configuredProject = JSON.parse(JSON.stringify(projectClone));
const configuredProject = JSON.parse(projectStringified);

// Enhance project with its configuration
Object.assign(configuredProject, config);
Expand Down