Meleze.web asp.net mvc 3 razor minify and compress

2019-04-18 01:14发布

I have find meleze.web in nuget to remove extra white spaces in generated html result. but when i set web.config new , and run nothing happend to result. is there any correct sample or special configs ?

<configuration>
  <system.web.webPages.razor>
    <host factoryType="Meleze.Web.Razor.MinifyHtmlWebRazorHostFactory,Meleze.Web.Razor" />
 </system.web.webPages.razor>
</configuration>

2条回答
劫难
2楼-- · 2019-04-18 01:37

For a little bit of context, we're talking about the tool described here: http://cestdumeleze.net/blog/2011/minifying-the-html-with-asp-net-mvc-and-razor/

I used the following config:

<configuration>
    ...
    <system.web.webPages.razor>
        <host factoryType="Meleze.Web.Razor.MinifyHtmlWebRazorHostFactory, Meleze.Web, Version=1.0.0.1, Culture=neutral, PublicKeyToken=0a868b5321967eda" />
        ...
查看更多
甜甜的少女心
3楼-- · 2019-04-18 01:38

Maybe you have changed the /web.config instead of the /Views/web.config that config.

Contact the package owner if needed to get help ;-)

查看更多
登录 后发表回答