YMFE / ykit

基于 Webpack 的灵活快速的打包工具,帮助稳定高效构建现代 JavaScript 应用。
https://ykit.ymfe.org/
Apache License 2.0
392 stars 56 forks source link

热更新路径写死了127.0.0.1 #39

Closed bibiuc closed 6 years ago

bibiuc commented 6 years ago

导致局域网环境下无法热更新

honchy commented 6 years ago

可以修改 publichPath 来解决这个问题。

module.exports = {
    plugins: ['qunar'],
    config: {
        exports: ['./scripts/app.js'],
        modifyWebpackConfig: function(baseConfig) {
            // local dev prd
            config.output.local = Object.assign(config.output.prd, {
                 publichPath: '/'
            });

            return baseConfig;
        }
    }
};
roland-reed commented 6 years ago

Closed due to inactivity. Feel free to reopen if the problem still exists.