ligershark / WebOptimizer

A bundler and minifier for ASP.NET Core
Apache License 2.0
753 stars 113 forks source link

WebOptimizer Error RZ1034: Found a malformed 'link' tag helper. #237

Open jwbats opened 2 years ago

jwbats commented 2 years ago

For css files, WebOptimizer will cause build errors for link tags that are not self closing, when they are within 'environment' tags.

<link rel="stylesheet" href="~/css/blog/BlogPost.css" asp-append-version="true">

<environment include="Development">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vue-file-agent@1.7.3/dist/vue-file-agent.css" >
</environment>

For the second link tag, I get the message saying:

RZ1034: Found a malformed 'link' tag helper. Tag helpers must have a start and end tag or be self closing.

I then have to provide a closing slash, which fixes the error.

Would be better if it didn't cause a build error at all.

jwbats commented 2 years ago

I also get lots of errors when opening a 'diff' view from the 'git changes' tab.

Not sure if this is caused by WebOptimizer, as I sometimes experienced this before using WebOptimizer.