-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
experimental.css not support legacy browser? #16147
Comments
Yes, do you need to support old browsers? |
yes, we still need to support old browsers like browser in android 4.4- |
oh, in thsi case css-loader can help here, new approach has better perf and logic, but requires new browsers |
This issue had no activity for at least three months. It's subject to automatic issue closing if there is no activity in the next 15 days. |
bump |
Issue was closed because of inactivity. If you think this is still a valid issue, please file a new issue with additional information. |
@TheLarkInn Maybe we should mark this in docs as non fixable and required modern browsers |
I think this is very important, actually when I finish migrating my tools from css-loader to experiments.css and find the compatible problem I feel depressed |
CSS will work on old browsers ("production"), only dev mode and HMR will not work on old browsers |
glad to know this, because we do have lots of application users who need to use legacy browser(you know the old android machine), so rspack differs with webpack now in css implementation for sake of legacy browsers, so if webpack could support legacy browsers(even only in production), we can align to this webpack's behavior now. |
@hardfist I will add testcases to ensure it, but based on code it should work, let's look at our code, we try to use
But I think it is fine with |
I did some research and fixes (I think we will fix it in multiple PRs, the first will be soon):
So for the last we can:
Our main problem is that we need to understand where and how to store modules which concated into chunk. I am now downloading images of old systems to try different approaches. Maybe I can find some other approaches and solutions. |
Technically, of course, we can try to store all modules (for initial and async) inside JS runtime chunk, this will increase the size of runtime chunk. On the other hand, we can only do this when your don't have |
I think this is reasonable.
Do we really need to support legacy browser in this way? I thought we just need to create facade If I remember correctly, this is also how Webpack bundles CSS with targeting |
Let me try to describe the behaviors. @alexander-akait Please correct me if I'm wrong. If the user set If the user set |
bump |
@alexander-akait it seems it is not resolved can we reopen it |
@hardfist Yeah, can you describe which browsers do you want to support, or just any old browser? |
thanks, the lowest version we have to support is iOS 10 & android 5 |
Can we store the css modules name mapping at JS chunk instead of css chunk, the downside is that it will increase the size of the JS chunk, use runtime module to register css modules after loading a chunk |
I think this is okay because the total size should be the same. |
We can try it and check it out |
Bug report
What is the current behavior?
experimental.css may not supports legacy browser because it relys on css variable to load css chunk, I'm wondering whether it's by design
If the current behavior is a bug, please provide the steps to reproduce.
What is the expected behavior?
Other relevant information:
webpack version:
Node.js version:
Operating System:
Additional tools:
The text was updated successfully, but these errors were encountered: