Is it possible to make the Next.js web app support older browsers, e.g., Android Browser v37 ?
Unanswered
Capelin posted this in #help-forum
CapelinOP
I have reasons to make a web app to support older browsers. But the web app is not working correctly. It may be that dynamic import is not supported by older browsers and etc.
How can I solve this problem?
How can I solve this problem?
18 Replies
@Capelin I have reasons to make a web app to support older browsers. But the web app is not working correctly. It may be that dynamic import is not supported by older browsers and etc.
How can I solve this problem?
try [browserlist](https://nextjs.org/docs/architecture/supported-browsers#browserslist)
@joulev try [browserlist](<https://nextjs.org/docs/architecture/supported-browsers#browserslist>)
CapelinOP
after trying on a fresh new next.js 13 project
- error ./app/globals.css.webpack[javascript/auto]!=!./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[5].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[5].oneOf[12].use[3]!./app/globals.css
BrowserslistError: Unknown version 37 of android
at Array.reduce (<anonymous>)
- error ./app/globals.css.webpack[javascript/auto]!=!./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[5].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[5].oneOf[12].use[3]!./app/globals.css
BrowserslistError: Unknown version 37 of android
at Array.reduce (<anonymous>)
"browserslist": [
"chrome 64",
"android 37",
"edge 79",
"firefox 67",
"opera 51",
"safari 12"
]@Capelin after trying on a fresh new next.js 13 project
- error ./app/globals.css.webpack[javascript/auto]!=!./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[5].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[5].oneOf[12].use[3]!./app/globals.css
BrowserslistError: Unknown version 37 of android
at Array.reduce (<anonymous>)
json
"browserslist": [
"chrome 64",
"android 37",
"edge 79",
"firefox 67",
"opera 51",
"safari 12"
]
check the [browserslist](https://browsersl.ist) documentation to see the correct syntax
i myself am not sure of how to write it either because i have never had to support this browser
@joulev check the [browserslist](<https://browsersl.ist>) documentation to see the correct syntax
CapelinOP
I think the syntax is correct.
@Capelin does it actually work i.e. does the css and js actually work on this browser when you test it?
@joulev seems like this works
CapelinOP
It seems that browserlist may not work.
I will try other solutions, e.g.,
1. SSR: It may not be affected by older browsers (not sure about dynamic import here).
2. Use a static page inside next for some pages require support for older browsers.
I will try other solutions, e.g.,
1. SSR: It may not be affected by older browsers (not sure about dynamic import here).
2. Use a static page inside next for some pages require support for older browsers.
@joulev <@784076587678564413> does it actually work i.e. does the css and js actually work on this browser when you test it?
CapelinOP
Some CSSs do not work. May need to downgrade the CSS framework.
I think Next.js designed for most modern browsers.
https://nextjs.org/docs/architecture/supported-browsers
https://nextjs.org/docs/architecture/supported-browsers
@Capelin Some CSSs do not work. May need to downgrade the CSS framework.
Try autoprefixer postcss if you do use postcss
@joulev Try autoprefixer postcss if you do use postcss
CapelinOP
It seems to be enabled by default.
I might keep the existing pages that use Next.js as they are, while I may need to create special handling for pages that need to support older browsers.
Thank you very much. @joulev
You’re welcome and sorry for not being able to help much, I’ve never had to support old browsers before
@Capelin It seems to be enabled by default.
Cape lion
Do you have a fix. I have a smart tablet that uses Chrome 66 that is from 2018 i think. And i would lime to support it as it's 25 % of my trafic. As the app was primarly made for it.