You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
因为线上部署的是build之后的版本,没法直接调试,在使用webpack的时候,我们可以Requestly插件的Intercept js request 拦截线上的请求,然后在通过insert local js把本地的JS文件插入进去,这样就可以用本地的代码来替换线上的代码,很方便调试。
比如我只需要拦截https://mydomain.com/static/js/*.js, 然后insert下面三个js文件就可以了:
static/js/bundle.js
static/js/0.chunk.js
static/js/main.chunk.js
因为webpack开发的时候本地的js文件只有这几个,但vite开发的时候本地会加载太多的js文件,在Requestly插件里面基本没法去写insert的rule.
不知道是否有办法可以让Vite的开发环境可以兼容Reqestly插件呢
Beta Was this translation helpful? Give feedback.
All reactions