forked from OpenNeo/impress
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:
parent
ed0e9ec9fd
commit
5556873eaa
1 changed files with 1 additions and 1 deletions
|
@ -29,6 +29,6 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "yarn build:base --minify",
|
"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",
|
"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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue