Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: consider custom devServer config #10492

Merged
merged 1 commit into from
Aug 4, 2021

Commits on Jun 15, 2021

  1. fix: consider custom devServer config

    I´m using a custom Docker setup and had trouble to get the watch-admin running. After some testing i found a few things. 
    
    I had to first add the url to the config and second add the devServer config.
    
    webpack: (config, webpack) => {
          config.devServer = {
                host: '0.0.0.0',
                useLocalIp: false
        };
        return config;
    },
    
    After that strapi develop --watch-admin was accessible over the docker ip. But because the config gets not forwarded in the opts, the hot reload doesn't work. 
    That's because this doesn't get the args that i setup.
    
    function createDomain(options, server) {
      const protocol = options.https ? 'https' : 'http';
      const hostname = options.useLocalIp
        ? ip.v4.sync() || 'localhost'
        : options.host || 'localhost';
    
    If there is a another way I would like to know. Otherwise I would appreciate this small hotfix.  
    
    Here my original problem -> https://stackoverflow.com/questions/8925820/javascript-object-push-function
    graphicfox committed Jun 15, 2021
    Configuration menu
    Copy the full SHA
    24d2373 View commit details
    Browse the repository at this point in the history