Only run elm-optimize-level-2 for --optimize flag.

This commit is contained in:
Dillon Kearns 2022-08-24 11:55:36 -07:00
parent 5595493fcc
commit 3745c76ecb

View File

@ -393,7 +393,7 @@ function elmOptimizeLevel2(outputPath, cwd) {
*/ */
async function spawnElmMake(mode, options, elmEntrypointPath, outputPath, cwd) { async function spawnElmMake(mode, options, elmEntrypointPath, outputPath, cwd) {
await runElmMake(mode, options, elmEntrypointPath, outputPath, cwd); await runElmMake(mode, options, elmEntrypointPath, outputPath, cwd);
if (!options.debug) { if (mode === "optimize") {
await elmOptimizeLevel2(outputPath, cwd); await elmOptimizeLevel2(outputPath, cwd);
} }
await fsPromises.writeFile( await fsPromises.writeFile(