diff options
Diffstat (limited to 'doc/development/fe_guide/frontend_faq.md')
-rw-r--r-- | doc/development/fe_guide/frontend_faq.md | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/development/fe_guide/frontend_faq.md b/doc/development/fe_guide/frontend_faq.md index 4f814f3cdde..3c0845a9aaa 100644 --- a/doc/development/fe_guide/frontend_faq.md +++ b/doc/development/fe_guide/frontend_faq.md @@ -146,3 +146,20 @@ export const fetchFoos = ({ state }) => { return axios.get(state.settings.fooPath); }; ``` + +### 7. How can I test the production build locally? + +Sometimes it's necessary to test locally what the frontend production build would produce, to do so the steps are: + +1. Stop webpack: `gdk stop webpack`. +1. Open `gitlab.yaml` located in your `gitlab` installation folder, scroll down to the `webpack` section and change `dev_server` to `enabled: false`. +1. Run `yarn webpack-prod && gdk restart rails-web`. + +The production build takes a few minutes to be completed; any code change at this point will be +displayed only after executing the item 3 above again. +To return to the normal development mode: + +1. Open `gitlab.yaml` located in your `gitlab` installation folder, scroll down to the `webpack` section and change back `dev_server` to `enabled: true`. +1. Run `yarn clean` to remove the production assets and free some space (optional). +1. Start webpack again: `gdk start webpack`. +1. Restart GDK: `gdk-restart rails-web`. |