Swr: Which browsers are supported?

Created on 21 May 2020  路  2Comments  路  Source: vercel/swr

Most helpful comment

@irekrog it depends on how you compiling your code on application side. by default swr is compiled to es5 by typescript. and didn't rely on any browser specific features. basically browsers supported es5, Map, react can work with swr without doubt.

if you want to support more browsers, you can use @babel/preset-env with browserslist config to cover your targeting browsers https://babeljs.io/docs/en/babel-preset-env#browserslist-integration

All 2 comments

@irekrog it depends on how you compiling your code on application side. by default swr is compiled to es5 by typescript. and didn't rely on any browser specific features. basically browsers supported es5, Map, react can work with swr without doubt.

if you want to support more browsers, you can use @babel/preset-env with browserslist config to cover your targeting browsers https://babeljs.io/docs/en/babel-preset-env#browserslist-integration

@huozhi thanks

Was this page helpful?
0 / 5 - 0 ratings