
获得徽章 0
Vue-Router v4 Issue Thinking:
1. 匹配规则优先级?
[
'/dynamic/:id',
'/dynamic/custom-:id(\\d+)', // "/dynamic/custom-222" => 优先匹配此行规则
'/dynamic/:id(\\d+)', // "/dynamic/1111" => 优先匹配此行规则
'/repeat/:dir*',
'/repeat/:dir+', // "repeat/a/b/c" => 优先匹配此行规则
]
2. param route path as alias router-link 不会触发 active
"'/alias'".children = [
{ path: '', alias: [':id(\\d+)']. }
]
/alias/abc 可以正确匹配,
router-link['/alias/abc'] 和 router-link['/alias'] active 状态不一致
1. 匹配规则优先级?
[
'/dynamic/:id',
'/dynamic/custom-:id(\\d+)', // "/dynamic/custom-222" => 优先匹配此行规则
'/dynamic/:id(\\d+)', // "/dynamic/1111" => 优先匹配此行规则
'/repeat/:dir*',
'/repeat/:dir+', // "repeat/a/b/c" => 优先匹配此行规则
]
2. param route path as alias router-link 不会触发 active
"'/alias'".children = [
{ path: '', alias: [':id(\\d+)']. }
]
/alias/abc 可以正确匹配,
router-link['/alias/abc'] 和 router-link['/alias'] active 状态不一致
展开
评论
1
感谢 mdn/content 让我找到了 git sub module 的应用场景。
之前与 server 共享 protocol buffer 没用上,一直在找下一个合适场景。
之前与 server 共享 protocol buffer 没用上,一直在找下一个合适场景。
4
11
使用 Github Pages + Markdown + mermaid DSL 的朋友
不考虑兼容性的情况可以看眼这个
-----
顺便能验证下现在支持 ES Module 浏览器的覆盖性
不考虑兼容性的情况可以看眼这个
-----
顺便能验证下现在支持 ES Module 浏览器的覆盖性
展开
评论
点赞
a.ts --依赖--> node_modules/b/b.esm.js ---> 使用了 nullish coalescing (release in ES2020)
esbuild loader 为 ts,
调整 tsconfig 的 target 至 es2019 无效....
esbuild.loader = { '.esm.js': 'ts' } 也无效
必须指定 esbuild target 为 es2019 ... 才能解决
esbuild loader 为 ts,
调整 tsconfig 的 target 至 es2019 无效....
esbuild.loader = { '.esm.js': 'ts' } 也无效
必须指定 esbuild target 为 es2019 ... 才能解决
展开
评论
点赞
uni-app 基于 pages.json 声明。
页面的运行时路由和页面的工程目录强制一致,未解藕....
那还不如像 next.js 一样构建时扫描指定目录, 页面的配置信息通过指定的方式声明。
最终生成运行时 pages.json...
![[无辜呆]](//lf-web-assets.juejin.cn/obj/juejin-web/xitu_juejin_web/img/jj_emoji_96.4fb9d71.png)
![[无辜呆]](//lf-web-assets.juejin.cn/obj/juejin-web/xitu_juejin_web/img/jj_emoji_96.4fb9d71.png)
![[无辜呆]](//lf-web-assets.juejin.cn/obj/juejin-web/xitu_juejin_web/img/jj_emoji_96.4fb9d71.png)
![[无辜呆]](//lf-web-assets.juejin.cn/obj/juejin-web/xitu_juejin_web/img/jj_emoji_96.4fb9d71.png)
uni-app x 基于 uts, 都自己开发语言解释器了,不知道考不考虑实现这个功能![[无辜呆]](//lf-web-assets.juejin.cn/obj/juejin-web/xitu_juejin_web/img/jj_emoji_96.4fb9d71.png)
![[无辜呆]](//lf-web-assets.juejin.cn/obj/juejin-web/xitu_juejin_web/img/jj_emoji_96.4fb9d71.png)
![[无辜呆]](//lf-web-assets.juejin.cn/obj/juejin-web/xitu_juejin_web/img/jj_emoji_96.4fb9d71.png)
页面的运行时路由和页面的工程目录强制一致,未解藕....
那还不如像 next.js 一样构建时扫描指定目录, 页面的配置信息通过指定的方式声明。
最终生成运行时 pages.json...
![[无辜呆]](http://lf-web-assets.juejin.cn/obj/juejin-web/xitu_juejin_web/img/jj_emoji_96.4fb9d71.png)
![[无辜呆]](http://lf-web-assets.juejin.cn/obj/juejin-web/xitu_juejin_web/img/jj_emoji_96.4fb9d71.png)
![[无辜呆]](http://lf-web-assets.juejin.cn/obj/juejin-web/xitu_juejin_web/img/jj_emoji_96.4fb9d71.png)
![[无辜呆]](http://lf-web-assets.juejin.cn/obj/juejin-web/xitu_juejin_web/img/jj_emoji_96.4fb9d71.png)
uni-app x 基于 uts, 都自己开发语言解释器了,不知道考不考虑实现这个功能
![[无辜呆]](http://lf-web-assets.juejin.cn/obj/juejin-web/xitu_juejin_web/img/jj_emoji_96.4fb9d71.png)
![[无辜呆]](http://lf-web-assets.juejin.cn/obj/juejin-web/xitu_juejin_web/img/jj_emoji_96.4fb9d71.png)
![[无辜呆]](http://lf-web-assets.juejin.cn/obj/juejin-web/xitu_juejin_web/img/jj_emoji_96.4fb9d71.png)
![[无辜呆]](http://lf-web-assets.juejin.cn/obj/juejin-web/xitu_juejin_web/img/jj_emoji_96.4fb9d71.png)
展开
评论
1
终于搬砖搬到了里程碑2了...
一个缩紧问题导致 GitHub Action script 环境变量未成功设置,最终自动发布 CI 没跑过
一个缩紧问题导致 GitHub Action script 环境变量未成功设置,最终自动发布 CI 没跑过
![[捂脸]](http://lf-web-assets.juejin.cn/obj/juejin-web/xitu_juejin_web/img/jj_emoji_28.8981538.png)
评论
点赞
赞了这篇沸点


1
7
利用 PerformanceObserver 监听网络请求
然后将异常请求上报错误日志系统
-------------
function perf_observer(entryList, observer) {
entryList.getEntries().forEach(entry => {
// 处理 performance entry
// 如果某项指标达不到标准,上报 Sentry
console.log(entry);
});
};
const resourcePerformanceObserver = new PerformanceObserver(perf_observer);
resourcePerformanceObserver.observe({ entryTypes: ["resource"] });
--------
如果该行为在 Worker 中实现是否有约束?
然后将异常请求上报错误日志系统
-------------
function perf_observer(entryList, observer) {
entryList.getEntries().forEach(entry => {
// 处理 performance entry
// 如果某项指标达不到标准,上报 Sentry
console.log(entry);
});
};
const resourcePerformanceObserver = new PerformanceObserver(perf_observer);
resourcePerformanceObserver.observe({ entryTypes: ["resource"] });
--------
如果该行为在 Worker 中实现是否有约束?
展开
评论
3