From ed107d6629b11eb10ffe73cbb1b07f88c2688e99 Mon Sep 17 00:00:00 2001 From: James Smith Date: Wed, 19 Jun 2024 14:00:57 +0100 Subject: [PATCH] force minification and tree-shaking for esbuild --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a00a90a52..539f794ad 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "private": true, "scripts": { "lint:ts": "ts-standard --fix", - "build": "bundle exec i18n export --config=./config/i18n-js.yml && esbuild app/javascript/*.* --bundle --sourcemap --outdir=app/assets/builds --public-path=assets", + "build": "bundle exec i18n export --config=./config/i18n-js.yml && esbuild app/javascript/*.* --minify=true --tree-shaking=true --bundle --sourcemap --outdir=app/assets/builds --public-path=assets", "build:css": "sass ./app/assets/stylesheets/application.bootstrap.scss:./app/assets/builds/application.css --no-source-map --load-path=node_modules", "typecheck": "bundle exec i18n export --config=./config/i18n-js.yml && tsc --project tsconfig.json" },