Skip to content

Commit

Permalink
Address rsimha feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
samouri committed Sep 22, 2021
1 parent 402ae3d commit 76b3762
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build-system/tasks/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ async function esbuildCompile(srcDir, srcFilename, destDir, options) {
};
}
const {banner, footer} = splitWrapper();
const config = await getAmpConfigForFile(srcFilename, options);
const config = await getAmpConfigForFile(destFilename, options);
const compiledFile = await getCompiledFile(srcFilename);
banner.js = config + banner.js + compiledFile;

Expand Down
2 changes: 1 addition & 1 deletion build-system/tasks/prepend-global/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ async function getConfig(
* @return {!Promise<string>}
*/
async function getAmpConfigForFile(filename, options) {
const targets = MINIFIED_TARGETS.concat(UNMINIFIED_TARGETS);
const targets = options.minify ? MINIFIED_TARGETS : UNMINIFIED_TARGETS;
const target = path.basename(filename, path.extname(filename));
if (!!argv.noconfig || !targets.includes(target)) {
return '';
Expand Down

0 comments on commit 76b3762

Please sign in to comment.