diff --git a/cli.ts b/cli.ts index 3d2f27e..202012e 100644 --- a/cli.ts +++ b/cli.ts @@ -69,6 +69,7 @@ const instructs = { console.time(colors.green("Compiled successfully in")); await RollupBuild({ dir: common.dom.dir, entryFile: common.entryFile }); console.timeEnd(colors.green("Compiled successfully in")); + Deno.exit(0); } else notFoundConfig(); diff --git a/compiler/build.ts b/compiler/build.ts index a76bbd6..c82b452 100644 --- a/compiler/build.ts +++ b/compiler/build.ts @@ -60,6 +60,7 @@ export async function RollupBuild({ sourcemap: !production, }, cache, + treeshake: production }; const bundle = await rollup(options); diff --git a/src/dev_server/hotReloadingClient.js b/src/dev_server/hotReloadingClient.js index 19c4003..a5fe867 100644 --- a/src/dev_server/hotReloadingClient.js +++ b/src/dev_server/hotReloadingClient.js @@ -46,7 +46,7 @@ export default (__SNEL__HOST__) => { const Reload = () => { const badge = document.querySelector("#msg"); if (badge) badge.setAttribute("style", "margin-top: 30px;"); - setTimeout(() => window.location.reload(), 50); + window.location.reload(); }; socket.addEventListener("message", (event) => {