From f2f51cd40deb9f1e3ff12c21f4cae7ed460e6a48 Mon Sep 17 00:00:00 2001 From: Dillon Kearns Date: Fri, 11 Mar 2022 11:50:02 -0800 Subject: [PATCH] Remove app dying messages from compiled lamdera output. --- generator/src/build.js | 2 +- generator/src/compile-elm.js | 12 +----------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/generator/src/build.js b/generator/src/build.js index 4cd9196a..66d7e366 100755 --- a/generator/src/build.js +++ b/generator/src/build.js @@ -518,7 +518,7 @@ function _HtmlAsJson_toJson(html) { return forceThunks(html); `) ) - .replace(`console.log("App dying");`, ``) + .replace(`console.log('App dying')`, "") ); } diff --git a/generator/src/compile-elm.js b/generator/src/compile-elm.js index bf9c66fa..ef40c6a9 100644 --- a/generator/src/compile-elm.js +++ b/generator/src/compile-elm.js @@ -21,17 +21,7 @@ async function spawnElmMake(options, elmEntrypointPath, outputPath, cwd) { /return \$elm\$json\$Json\$Encode\$string\(.REPLACE_ME_WITH_JSON_STRINGIFY.\)/g, "return " + (debug ? "_Json_wrap(x)" : "x") ) - .replace( - "return ports ? { ports: ports } : {};", - `const die = function() { - managers = null - model = null - stepper = null - ports = null - } - - return ports ? { ports: ports, die: die } : { die: die };` - ) + .replace(`console.log('App dying')`, "") ); }