Fix asset path in JS modules in development

Oh right, since we've told Rails that in development the assets path is `/dev-assets`, but the JS scripts don't know that, they're still sending requests to `/assets/thing.svg` or whatever, which is returning the prebuilt production asset if present, or nothing if not. Fixed!
This commit is contained in:
Emi Matchu 2023-08-22 16:15:21 -07:00
parent ed0e9ec9fd
commit 5556873eaa

View file

@ -29,6 +29,6 @@
"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"
"dev": "yarn build:base --watch --public-path=/dev-assets"
}
}