Yuanlin Lin

Results 11 issues of Yuanlin Lin

修复了路由预加载功能只加载了 js 文件,忽略了 css 文件的问题

bug

把 route-preload 需要的 manifest 注入到 umi.js 这个步骤从原本的 `api.onBuildComplete` 移到了 Webpack Plugin 内部进行

enhancement

- [ ] 标题的锚点按钮 - [ ] "上一篇" / "下一篇" 文档链接 - [ ] 文档上次更新时间 - [ ] 文档编辑链接(快速跳转到 GitHub 仓库对应文件的链接) - [ ] 文档单代码块支持切换不同语言的实现 (类似 [esbuild 的文档](https://esbuild.github.io/api/#allow-overwrite)) - [...

documentation
enhancement

帮 `plugin-docs` 加入了基于约定式路由的重导向配置能力。 ### 使用场景 有时候有些路由本身并没有内容,我们希望当这个路由被打开的时候可以直接重导向到他下面的某个子路由,例如: `/docs` 这一页是空的,我们希望当有人进入 `/docs` 时会自动被重导向到 `/docs/tutorials/getting-started` 页面。 ### 使用方式 只要在 `/docs/docs/README.md` 也就是我们想要进行重导向的页面,在第一行写上 ```markdown [redirect]:- "./tutorials/getting-started" ``` 这样当有人进入这个页面,就会被重导向到他设置的页面中。

documentation
enhancement

修复了 #566 API 路由功能在匹配路由时行为不一致的问题。 解决方案是在 match 前对路由进行排序,优先匹配较长的路由。 对于长度相同的路由,优先匹配静态路由而不是动态路由。 example: 假设我们有以下路由 ``` /api/users/[id] /api/users/banana /api/users/[id]/apple /api/users/[id]/[repo] ``` 则排序结果应该是 ``` /api/users/[id]/apple /api/users/[id]/[repo] /api/users/banana /api/users/[id] ``` 然后自上而下匹配当前请求路径,找到应该给哪个 API 路由处理

bug

# 问题 如果用户的项目结构没有用 `src` 目录将源代码包起来,直接在 `cwd.api` 目录使用 API 路由的功能的话,API 路由的构建产物会和源代码目录冲突。 # 修复方案 这个 PR 将 `umi dev` 时的 API 路由构建产物从 `cwd.api` 移至 `.umi/api/_compile` 临时目录内,因此源代码不会被覆盖掉。 # 备注 将构建产物放置于 `cwd.api` 是 [Vercel...

bug

支持将 API 路由部署到 [Netlify](https://www.netlify.com) 平台上。 参考:https://docs.netlify.com/functions/overview/

`plugin-container-query-polyfill` 将 [container-query-polyfill](https://www.skypack.dev/view/container-query-polyfill) 补丁进行封装,Umi 项目只要简单安装该插件就能在浏览器中使用 css 的 [Container Queries](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Container_Queries) 功能。

第二階段開始進行翻譯 `/learn/basics` 官方教學系列的文章,請大家踴躍協助認領翻譯任務,感謝 🙏 - [ ] /learn/basics - [x] create-nextjs-app - [x] index @yenbigbear #78 - [x] setup @yenbigbear #78 - [x] welcome-to-nextjs @yenbigbear #78 - [x] editing-the-page @yenbigbear...

在下面留言自己要認領的頁面路徑,例如 `/docs/basic-features/pages`。 - [ ] docs - [ ] basic-features - [x] built-in-css-support @AndreaFan123 #51 - [x] data-fetching - [x] client-side @f312213213 #54 - [x] get-server-side-props @Danny101201 #46 - [x]...