Skip to content

Web 项目热加载 #6105

Answered by code-asher
ghost asked this question in Ideas
Mar 25, 2023 · 1 comments · 8 replies
Discussion options

You must be logged in to vote

While that explains why we need allowedHosts it does not explain why we need webSocketURL. I poked at it a little but I still have no idea why it works in Codespaces without extra configuration. For now I think we just have to set it.

That leaves us with this config:

module.exports = defineConfig({
  transpileDependencies: true,
  devServer: {
    allowedHosts: "all",
    client: {
      webSocketURL: "auto://0.0.0.0:0/ws",
    },
  },
})

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@code-asher
Comment options

@code-asher
Comment options

@code-asher
Comment options

@code-asher
Comment options

Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
1 participant