ice
ice copied to clipboard
移动端配置代理之后热更新失败
Describe the bug
开发移动端项目,真机调试配置代理到电脑上之后,页面无法热更新
Expected behavior
希望可以解决这个问题或者是提供开关关闭热更新
Actual behavior
No response
Version of ice.js
3.4.8
Content of build.json or ice.config.mts
import { defineConfig } from "@ice/app";
import request from "@ice/plugin-request";
import store from "@ice/plugin-store";
// The project config, see https://v3.ice.work/docs/guide/basic/config
const minify = process.env.NODE_ENV === "production" ? "swc" : false;
export default defineConfig(() => ({
ssg: false,
// hash: "contenthash",
compileDependencies: false,
minify,
server: {
onDemand: true,
format: "esm",
},
plugins: [request(), store()],
postcss: {
plugins: ["tailwindcss"],
},
dropLogLevel: false,
routes: {
// 忽略 src/pages 下所有 components 目录
ignoreFiles: ["**/components/**"],
},
}));
Additional context
No response
热更新依赖 websocket 服务,需要确认你的代理配置有没有处理好
走代理的情况下,可以参考 https://webpack.js.org/configuration/dev-server/#websocketurl 的设置