I'm working on a certain .NET MVC project, in which we use library called WebMarkupMin to minify the frontend code. Problem is, during minification some data is lost/corrupted and that leads to hydration errors in the console. WebMarkupMin allows option to preserve some data from removal during minification, for example we have managed to successfully avoid loss of values from input fields by using the following line of code:
HtmlMinificationManager.Current.MinificationSettings.AddPreservableAttribute("input[value]");
Now I am trying to do the same for certain div element. The div looks like this:
<div class=react-container data-component-name=Panel
*Minified code*
data-server-side-redux-state="" data-server-side-rendered=True data-use-redux=False>
I have so far came up with this:
HtmlMinificationManager.Current.MinificationSettings.AddPreservableAttribute("div[data-server-side-rendered=True]");
...but it doesn't work. Does anyone knows how to change it to make it work?