Pass browserlist targets to lightningcss#53128
Conversation
timmo001
left a comment
There was a problem hiding this comment.
Change looks sound, not tested the actual issue though, second opinion wanted
|
If there is a way to easily test this change on a Shelly Wall Display I can do that. |
| import("browserslist"), | ||
| import("lightningcss"), | ||
| ]).then(([minifyModule, browserslistModule, lightningcssModule]) => { | ||
| const browserslist = browserslistModule.default; |
There was a problem hiding this comment.
I couldnt find the corrected alpha values in the Dev Demo deploy.
(--divider-color should be rgba instead of a Hex value)
I think lightningcss doesnt do anything because browserlistModule.default is empty?
I think we need to pass the correct group, 'modern' and 'legacy' for both builds.
There was a problem hiding this comment.
It didn't really deploy and the unique url isn't outputted either, so don't put much time into that.
There was a problem hiding this comment.
I've been able to fix it, but it takes the dev branch as a checkout anyway, so if you could test locally that would be great.
There was a problem hiding this comment.
Interesting, I've done a production build and in the es5 build I still see hexvalues with alpha. (Search for --divider-color: in hass_frontend).
I edited the code locally so the correct browserlist is passed and then I do get es5 builds correctly going through lightningcss for transpiling, returning rgba for --divider-color in the es5 build and hex values for the modern build.
Doesnt fully work though, I had to turn off lightningcss vendor prefixing as it didnt work well with minify-literals, I think if we are adding CSS transpiling we should also have vendor prefixing working.
Ive also tried to simulate the bugs mentioned with the Android Webview that Shelly Wall Displays use, but I cannot reproduce it, so it is very specific to the Shelly Android build, we would need someone with an actual device to test it properly.
bb65a42 to
b8be36c
Compare
|
I've been able to deploy it now and it's indeed faulty again. Not sure why it works for me locally. |
I tested https://6a5a4ecdd820d3125a2ffd81--home-assistant-demo-dev.netlify.app on my Shelly Wall Display X2 and yes, the issue remains. Let me know if/how I can help out. |
|
Issue seems fixed right now, but it doesn't minify anything at all anymore. I'm out of ideas. |
|
I have it working locally I believe, let me check one more time and Ill PR into this. |
Proposed change
Fixes #53084
Fixes #52986
Please double check, I've been able to see that the css tokens are back to what they were, but not really into the build of HA.
Screenshots
Type of change
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed:
To help with the load of incoming pull requests: