You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello guys, I am totally new to encore and yarn. I follow the doc in symfony.com to begin managing assets with encore. However, there are something I am not sure when I deploy to a production server, like: should I run yarn install --production? how can I compress js file? A documentation or a guild about doploying in production in detail will be nice to us newbies
The text was updated successfully, but these errors were encountered:
This is a good idea. Some pointers to help you for now:
Run ./node_modules/.bin/encore production before / during deploying to create your final .js and .css files
You don't need to deploy the node_modules directory at all. So if you run encore before deploying, you can just deploy the final web/build directory and not deploy the node_modules directory. That's why you don't need to worry about running anything like yarn install --production: all of the npm packages and Encore stuff is not needed on production at all (only the finished files in the build directory are needed).
When you run ./node_modules/.bin/encore production, all of your .js and .css files should be compressed automatically :).
I've just created a docs issue: symfony/symfony-docs#8094. If you have any other questions, can you ask on there? I'm sure other people will have the same questions, so it'll help us answer all of them.
Hello guys, I am totally new to encore and yarn. I follow the doc in symfony.com to begin managing assets with encore. However, there are something I am not sure when I deploy to a production server, like: should I run
yarn install --production
? how can I compress js file? A documentation or a guild about doploying in production in detail will be nice to us newbiesThe text was updated successfully, but these errors were encountered: