石坚

Results 4 issues of 石坚

const ctx = canvas.getContext('2d'); canvas.gpu = false; ctx.setTransform(0, 0, 0, 0, 154, 271.60133333333334); ctx.beginPath(); ctx.arc(0, 0, 2, 0, 6.283185307179586); ctx.closePath(); ctx.fill(); After executing the above statement, an error will be...

## What happens? prerender需要在ssr的node环境里编译好资源,如果在调用window对象的api时,例如window.location直接写成location,会导致build出错,但并不能被捕捉到,例如写了api.onBuildFail的插件,或者process.on('uncaughtException')去监听,都不能获取到报错事件,导致build出错提醒不可控。 以下是报错内容 (node:98854) UnhandledPromiseRejectionWarning: ReferenceError: history is not defined at Object.call (/Users/bytedance/Desktop/bytedance/ByteRangersFE/dist/src/app.ts:28:1) at require (/Users/bytedance/Desktop/bytedance/ByteRangersFE/dist/webpack/bootstrap:19:1) at Object.call (/Users/bytedance/Desktop/bytedance/ByteRangersFE/dist/src/pages/.umi-production/umi.js:28:13) **Expected behavior** 1.希望提供一个报错的callback,能帮助捕捉prerender报错 ## Context - **Umi Version 2.13.3**:...

## umi中的location在react-rounter基础上增加了query属性 umi在react-router中加入了query这个属性,但是umi-server环境获取不到这个query,导致报错 ## 组件代码 ` const Verify: React.FC = ({ location }) => { const { token } = location.query; ...... )}; ` ## 原页面中获取到的object截图 ![image](https://user-images.githubusercontent.com/5013633/72884713-86aee980-3d41-11ea-8f15-d12c350b5a7c.png) ## 使用ssr、prerender配置后,页面报错 `(node:25263)...