diff --git a/.devcontainer/post-create.sh b/.devcontainer/post-create.sh index d27e4297..1aff43ad 100755 --- a/.devcontainer/post-create.sh +++ b/.devcontainer/post-create.sh @@ -11,3 +11,9 @@ bundle install # Set up the databases: create the schema, and load in some default data. bin/rails db:schema:load db:seed + +# Install the app's JS dependencies. +yarn install + +# Run a first-time build of the app's JS, in development mode. +yarn build:dev diff --git a/package.json b/package.json index 98488824..f341db16 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ }, "scripts": { "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" + "build:dev": "yarn build --public-path=/dev-assets", + "dev": "yarn build:dev --watch" } }