MENU

React控制台警告:SharedArrayBuffer will require cross-origin isolation as of M91, around May 2021.

概述

React项目控制台出现警告:

[Deprecation] SharedArrayBuffer will require cross-origin isolation as of M91, around May 2021. See https://developer.chrome.com/blog/enabling-shared-array-buffer/ for more details.

不影响项目使用,但是看起来不舒服

解决方法

警告的原因是Chrome从Chrome 92开始,SharedArrayBuffer将仅限于跨源隔离页面。
目前项目使用的是react 17.0.1,只需要运行npm update或修改package.json,把react和react-dom版本更新到17.0.2即可


文章标题:React控制台警告:SharedArrayBuffer will require cross-origin isolation as of M91, around May 2021.
如果文中内容侵犯了您的权益,请及时与博主取得联系进行删除!
本站文章未经许可禁止转载,本文地址:https://blog.wanvale.com/archives/365/

Archives QR Code Tip
QR Code for this page
Tipping QR Code