assets:precompile installs npm dependencies with NODE_ENV=production but the path breakfast uses to invoke brunch is in local npm modules i.e. ./node_modules/brunch/bin/brunch. In our production environment, we want to run assets:precompile, but don't want to include brunch in our dependencies (only in dev. dependencies. However, being able to pass the brunch path in as an ENV var allows us to globally install brunch via npm install -g brunch in our Dockerfile and use this global binary as the brunch command path.
Going to go ahead and close this as this will not solve the problem I mentioned. This would work for brunch, but there are many other dev. dependencies needed by brunch that this would not work for.
Issue:
assets:precompile
installs npm dependencies withNODE_ENV=production
but the path breakfast uses to invokebrunch
is in local npm modules i.e../node_modules/brunch/bin/brunch
. In our production environment, we want to runassets:precompile
, but don't want to includebrunch
in our dependencies (only in dev. dependencies. However, being able to pass thebrunch
path in as an ENV var allows us to globally install brunch vianpm install -g brunch
in our Dockerfile and use this global binary as the brunch command path.