Skip to content

Commit

Permalink
feat: add treeshake in production mode
Browse files Browse the repository at this point in the history
  • Loading branch information
buttercubz committed Jul 13, 2021
1 parent df607b0 commit d65b1b6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
1 change: 1 addition & 0 deletions compiler/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export async function RollupBuild({
sourcemap: !production,
},
cache,
treeshake: production
};

const bundle = await rollup(options);
Expand Down
2 changes: 1 addition & 1 deletion src/dev_server/hotReloadingClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit d65b1b6

Please sign in to comment.