From 1f68829b15ffc06ad10d647ab83d3d5ad312bfce Mon Sep 17 00:00:00 2001 From: Matchu Date: Wed, 13 Sep 2023 17:31:38 -0700 Subject: [PATCH] Fix precompile error by removing unneeded minify Oh right, Rails does its own terser minification step, so using esbuild's minifier is just running two minifiers, which is just asking for trouble! For some reason, running it this time on the non-Vagrant box, terser was crashing trying to read something in the minified item-page.js. Now that we don't minify, that fixes it, and the output is still minified by the end! I do notice though that --minify does some other stuff in esbuild that I forget all of what it is. Oh well, not gonna worry about it for now! --- package.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index b1e313ee..9510df68 100644 --- a/package.json +++ b/package.json @@ -27,8 +27,7 @@ "tweenjs": "^1.0.2" }, "scripts": { - "build": "yarn build:base --minify", - "build:base": "esbuild app/javascript/*.* --bundle --sourcemap --outdir=app/assets/builds --public-path=/assets --asset-names=[name]-[hash].digested --loader:.js=jsx --loader:.png=file --loader:.svg=file --loader:.min.js=text", - "dev": "yarn build:base --watch --public-path=/dev-assets" + "build": "esbuild app/javascript/*.* --bundle --sourcemap --outdir=app/assets/builds --public-path=/assets --asset-names=[name]-[hash].digested --loader:.js=jsx --loader:.png=file --loader:.svg=file --loader:.min.js=text", + "dev": "yarn build --watch --public-path=/dev-assets" } }