ice icon indicating copy to clipboard operation
ice copied to clipboard

使用代理后通过https访问开发页面,热更新失效

Open tarnishablec opened this issue 3 years ago • 2 comments

What is the current behavior? 发生了什么?

现在devServer应该是默认通过域名的协议判断了hmr走ws还是wss协议,但是实际上在走代理的场景下不适用 ,如果能参考 vite hmr config,可以在build.json中自行配置hmr的协议就好了

截屏2021-04-22 下午5 34 07

What is the expected behavior? 期望的结果是什么?

Any additional comments? 相关环境信息?

  • ice.js Version:1.0.0
  • build.json Configuration:default
  • Node Version: v14
  • Platform: osx

tarnishablec avatar Apr 22 '21 09:04 tarnishablec

image 目前的确是通过域名的协议判断,这个需求我们评估下

ClarkXia avatar Apr 22 '21 10:04 ClarkXia

可以写个vite插件暂时替换hmr配置

{
      name: 'config-vite-hmr',
      config: () => ({
        server: {
          hmr: {
            clientPort: 443,
          },
        },
      }),
    },

hestudy avatar Apr 29 '22 03:04 hestudy