Flynt Next: Backward compatiblity #484
-
Hey guys We've been doing our first small projects using the One thing we ran into is support for older Browsers, specifically Safari 12 on older iOS versions. There seem to be generally issues with both JS and the more modern CSS approaches. JS CSS Do you generally have a best practice of adjustments you are making, if you want a project to support this platform? Thanks for your inputs. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @aaronmeder, thanks a lot for the feedback. In general our goal is to deliver a modern base so that developers can adopt Flynt fast to personal prefers or project specific needs. JS CSS Further we also started to use "logical-properties" in some newer projects and i personally did not run in any downfalls with it. In terms of adjustments to make if you want to support older platforms when using Flynt |
Beta Was this translation helpful? Give feedback.
-
@aaronmeder we talked today in our team about this topic. To add legacy support for javascript you can try the following:
import legacy from '@vitejs/plugin-legacy'
plugins: [
flynt({ dest, host }),
FullReload(watchFiles),
legacy()
],
For example ( if (isDesktopMediaQuery?.addEventListener) {
isDesktopMediaQuery.addEventListener('change', onBreakpointChange)
} else {
isDesktopMediaQuery.addListener(onBreakpointChange)
} or ( if (mediaQueryList?.addEventListener) {
mediaQueryList.addEventListener(
'change',
() => resolve(true),
{ once: true }
)
} else {
mediaQueryList.addListener(
() => resolve(true)
)
}
Let me know if this works for you? |
Beta Was this translation helpful? Give feedback.
@aaronmeder we talked today in our team about this topic. To add legacy support for javascript you can try the following:
@vitejs/plugin-legacy
and add it to thevite.config.js
adventlistener
is used in combination withmatchMedia
, and provide a fallback solution.For example (
script.js
from Navigation Main):or (
FlyntCom…