Skip to content

Commit

Permalink
feat(build): Minify outputs to save size in main.js file
Browse files Browse the repository at this point in the history
  • Loading branch information
andymac4182 committed Apr 13, 2023
1 parent 57ee9ea commit c879d5d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion esbuild.config.mjs
Expand Up @@ -30,7 +30,8 @@ const mermaid_renderer_plugin = {
sourcemap: false,
treeShaking: true,
write: false,
mainFields: ['module', 'main']
mainFields: ['module', 'main'],
minify: true,
}).catch(() => process.exit(1));

const fileContents = `
Expand Down Expand Up @@ -90,4 +91,5 @@ esbuild.build({
outdir: prod ? 'dist' : 'dev-vault/.obsidian/plugins/obsidian-confluence',
mainFields: ['module', 'main'],
plugins: [mermaid_renderer_plugin],
minify: true,
}).catch(() => process.exit(1));

0 comments on commit c879d5d

Please sign in to comment.