颜贵彬

Results 31 comments of 颜贵彬

为啥ajax库不选择superagent?

> @tcstory Did you ever find a solution for this? yes, I had fixed the problem by writing a new webpack plugin based on the original one, i didn't publish...

sorry. version 15.x of vue-loader will use the following code to add the component during ssr rendering, the code is located in lib/runtime/componentNormalizer.js ``` // register component module identifier for...

https://github.com/tcstory/postcss-px-to-viewport 我自己二次开发的插件, 支持 postcss 8.x 以上, 支持你想要的功能 ```css /* px-to-viewport-define landscapeWidth=600, viewportWidth=480 */ .rule { font-size: 15px; height: 50px; } ```

> I cannot use memfs for `compiler.inputFileSystem`. same problem

请问, 侵入性比较大, 也比较复杂.... 你们自己使用的话, 有统计过这一套技术的收益吗?

ios 现在一般用的是 wkwebview ,好像没法直接向 uiwebview 一样 拦截静态资源请求吧?

其实, 我更倾向于我个人认为的更轻量的方案. 就是app客户端, 实现一个类似于浏览器的 service worker(下面简称 sw) 的方案. 所以, 关于是否缓存 html 文件的话, 可以采用 sw 的 cache first 的策略, 就是优先使用缓存中的 html, 然后, 在后台去查询是否有新的 html. 如果有的话, 就下载下来, 这样, 用户下次打开 html 的时候, 就能拿到最新的文件....

补充一点, html 的及时更新是否很重要. 我司遇到的一个场景, 一个购买会员的页面, 在某次活动中, 把购买的入口给开放出来了, 之前的代码提交导致用户无法进行购买, 然后活动被临时下掉, 如果 html 文件无法得到即使更新, 那么, 我该如何让用户进行购买呢? 提示用户重启 app? 还是等待 app 的下一次轮询? 你可能会说, 这个功能没有验收吗? 为什么会上线. 其实是这样的, 这个购买能力的功能, 很早之前就上线了, 后面有新的需求要开发, 但是没有想到新需求的修改, 会影响到别的功能, 所以自然就没有发现引入了 bug....