Skip to content

Add local network compatibility to webpack dev server

Description

tldr;


In order to get the webpack dev server to serve on the local network (192.168.1.x), I need to update devServer.host: 192.168.1.135 in ./webpack.config.js so the dev server starts up correctly and also in ./config/gitlab.yml so that the settings that get overwriten in ./config/initializers/static_files.rb ends up pointing at the correct thing after getting transformed by webpack_asset_paths

Proposal

Couple of options I can think of:

  • Share the settings from ./config.gitlab.yml across the whole app (ruby and webpack config)
  • Add a echo 192.168.1.135 > webpack_host type file like we already have for webpack_port and host

Webpack MR: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7288

cc @mikegreiling