-
Notifications
You must be signed in to change notification settings - Fork 151
Home
Dorian Marié edited this page Oct 12, 2021
·
3 revisions
Welcome to the jsbundling-rails wiki!
e.g. how to have React production build on production and keep the development build on development/test environments
package.json
"scripts": {
"build": "esbuild app/javascript/*.* --bundle --outdir=app/assets/builds '--define:process.env.NODE_ENV=\"production\"' --minify",
"build-dev": "esbuild app/javascript/*.* --bundle --outdir=app/assets/builds"
}
Procfile.dev
web: bin/rails server -p 3000
js: yarn build-dev --watch