Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// something went really wrong, open an issue
throw new Error('Embroider: EWUT');
} else if (headerFiles.length === 1) {
// app.import(x, { outputFile: y }); where only one app.imports had this outputFile
//
// No concat needed. Simply serialize the remapping in the addon's
// manifest, this ensures it is included in the final output with no extra work.
this._publicAssets[headerFiles[0]] = importPath;
} else {
// app.import(x, { outputFile: y }); where multiple app.imports share one outputFile
// Concat needed. Perform concat, and include the outputFile in the
// addon's manifest. This ensures it is included in the final output
this._publicAssets[importPath] = importPath;
concatentations.push(
new Concat(tree, {
headerFiles,
outputFile: importPath,
annotation: `Package ${importPath}`,
separator: '\n;',
sourceMapConfig: this.app.options['sourcemaps'],
})
);
}
}
}
this.addOtherAssets();
return mergeTrees([tree, ...concatentations], { overwrite: true });
}