i18next-browser-languageDetector icon indicating copy to clipboard operation
i18next-browser-languageDetector copied to clipboard

8.0.0版本的打包产物不兼容低版本浏览器(?.操作符号)

Open wogaozhixu opened this issue 1 year ago • 4 comments

🐛 Bug Report

A clear and concise description of what the bug is. name: "querystring", lookup(e) { let t, {lookupQuerystring: r} = e; if ("undefined" !== typeof window) { let {search: e} = window.location; !window.location.search && window.location.hash?.indexOf("?") > -1 && (e = window.location.hash.substring(window.location.hash.indexOf("?"))); const n = e.substring(1).split("&"); for (let o = 0; o < n.length; o++) { const e = n[o].indexOf("="); e > 0 && n[o].substring(0, e) === r && (t = n[o].substring(e + 1)) } } return t }

To Reproduce

A minimal reproducible example. A codesandbox example or similar or at least steps to reproduce the behavior:

// Paste your code here

Expected behavior

A clear and concise description of what you expected to happen.

// Paste the expected results here

Your Environment

  • runtime version: i.e. node v14, deno, browser xy
  • i18next version: i.e. 19.5.3
  • os: Mac, Windows, Linux
  • any other relevant information

wogaozhixu avatar Jul 31 '24 07:07 wogaozhixu

sorry, but the bug description is completely unclear to me

jamuhl avatar Jul 31 '24 07:07 jamuhl

v8.0.0 is only compatible with newer browsers see changelog: https://github.com/i18next/i18next-browser-languageDetector/pull/286

if you need to support older browsers without transpilation, use v7

adrai avatar Jul 31 '24 07:07 adrai

//cc @VIKTORVAV99

adrai avatar Jul 31 '24 07:07 adrai

I'm really interested in how this is used as I would assume most people are using a build system to handle transpilation.

Could you share some insights into how you bundling your website?

VIKTORVAV99 avatar Jul 31 '24 07:07 VIKTORVAV99