-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
quesion
can we add css hack to resolve the quesion about ie ?
i had read the #2925 , This is very similar. But I think this is still worthy of discussion.
background
In our company's project, it depend on antdv4 ,it has some code about ie hack 。when using webpack's cssnano for compression, everything is normal. However, when I use vite for compression, at first, there is a situation of disordered styles. Later, it is found that vite 's compression by default uses esbuild for compression. "\9" is parsed into ";", which leads to the failure of parsing all styles in the entire CSS file.
But when using another compression configuration of vite, lightingcss, it is normal.
In summary, for the compression scenario, both cssnano and lightingcss can correctly handle the hack situation for IE, but it seems that esbuild has a deficiency in this regard.
I also understand that when IE is no longer maintained, it is a bit redundant to be compatible with IE. But when the dependency library uses "\9", the situation I mentioned above may occur.
