Should @babel
presets need to be normal dependencies in order for assets:precompile
to work?
#244
Replies: 3 comments
-
I believe this was happening because we were running What is the intended way to precompile assets for production? Even when |
Beta Was this translation helpful? Give feedback.
-
I believe the problem was multiple |
Beta Was this translation helpful? Give feedback.
-
@jennysharps I think the latest versions don't do the yarn installs at all. It's important to have your build process call Regarding production packages, many build environments run with the flag to skip the devDependencies. For example, that is the default behavior of Heroku's buildpacks. |
Beta Was this translation helpful? Give feedback.
-
We are working on moving to
shakapacker
from[email protected]
and noticed that the installation instructions advise us to install the@babel/preset-env
package--among others--as normal dependency instead of as a dev dependency.In addition to
@babel/preset-env
, we also use@babel/preset-react
&@babel/preset-typescript
. Usually, all of these presets are installed asdevDependencies
as per https://babeljs.io/docs/en/babel-preset-env#install, for example. When we moved them todevDependencies
, theassets:precompile
step began to fail with the following in our CI pipeline:It works fine if we promote them to
dependencies
. Is this expected? Can anybody shed some light on this behavior?Beta Was this translation helpful? Give feedback.
All reactions