build(docker): use esbuild for JS compiling
This commit is contained in:
parent
29014d1c56
commit
3651d69ce1
5 changed files with 135 additions and 2 deletions
13
run
13
run
|
@ -133,4 +133,17 @@ function task:yarn:build:css {
|
|||
--output build/app.css "${args[@]}"
|
||||
}
|
||||
|
||||
function task:yarn:build:js {
|
||||
# Build JS assets, this is meant to be run from within the assets container.
|
||||
local args=()
|
||||
|
||||
if [ "${NODE_ENV}" == "production" ]; then
|
||||
args=(--minify)
|
||||
else
|
||||
args=(--sourcemap --watch)
|
||||
fi
|
||||
|
||||
esbuild assets/js/*.* --outdir=build --bundle "${args[@]}"
|
||||
}
|
||||
|
||||
eval "task:${@:-help}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue