±¾ÎĽ«½éÉÜʹÓõĴò°üºÍѹËõµÄÓŵ㣬ÒÔ¼°ÈçºÎÔÚASP.NET CoreÓ¦ÓóÌÐòÖÐʹÓÃÕâЩ¹¦ÄÜ¡£
¸ÅÊöÔÚASP.NetÖпÉÒÔʹÓôò°üÓëѹËõÕâÁ½ÖÖ¼¼ÊõÀ´Ìá¸ßWebÓ¦ÓóÌÐòÒ³Ãæ¼ÓÔصÄÐÔÄÜ¡£Í¨¹ý¼õÉÙ´Ó·þÎñÆ÷ÇëÇóµÄ´ÎÊýºÍ¼õÉÙ×ÊÔ´ÎļþµÄÌå»ýÀ´Ìá¸ß¼ÓÔØÐÔÄÜ¡£
ÀýÈçÏÂÃæJavaScriptº¯Êý£º
AddAltToImg imageElement ..)); }
ѹËõºó£¬º¯Êý¼ò»¯ÎªÈçÏ£º
AddAltToImgr..))};
³ýÁËɾ³ý×¢ÊͺͲ»±ØÒªµÄ¿Õ¸ñÖ®Í⣬²ÎÊýºÍ±äÁ¿Ãû³Æ±»ÖØÃüÃû£¨Ëõд£©ÈçÏ£º
ÔʼÃû³Æ ÖØÃüÃûºó
imageTagAndImageID t
imageContext a
imageElement r
´ËʾÀýÀ´×ÔÓÚgithub:https://github.com/aspnet/Docs/blob/master/aspnetcore/client-side/bundling-and-minification.md
MVCÏîÄ¿Ä£°åÌṩÁËÒ»¸öbundleconfig.jsonÅäÖÃÎļþ£¬Ëü¶¨ÒåÁË´ò°üµÄÅäÖÃÑ¡ÏĬÈÏÇé¿öÏ£¬ÊµÏÖÁË×Ô¶¨Òå½Å±¾Îļþ(wwwroot/js/site.js) ºÍÑùʽ±í (wwwroot/css/site.css) ÎļþµÄÅäÖá£
[ [ "wwwroot/css/site.css" ] [ "wwwroot/js/site.js" ]]
ÅäÖÃÑ¡ÏîÏêϸ˵Ã÷£º
ÔÚVS 2015/2017ÐèÒª°²×°BundlerMinifierVsix£¬°²×°Íê³ÉºóÐèÒªÖØÆôVS¡£
ÔÚbundleconfig.jsonÎļþÓÒ¼üµ¥»÷£¬È»ºóÑ¡ÔñÈÎÎñÔËÐгÌÐò×ÊÔ´¹ÜÀíÆ÷¡£
ÔÚUpdate all fielsÑ¡ÏîÓÒ¼üµ¥»÷£¬È»ºóÑ¡ÔñRun¡£
ÔÚÏîÄ¿Öлá·Ö±ðÉú³ÉѹËõºóµÄ×ÊÔ´Îļþ¡£
ÔÚÊÓͼÖÐʹÓôò°üѹËõºóµÄ×ÊÔ´Îļþ
ÔÚÉÏһƪ²©¿Í¡¶ASP.NET CoreÅäÖû·¾³±äÁ¿ºÍÆô¶¯ÉèÖá·ÎÒÃÇÒѾÌÖÂÛ¹ý»·¾³±äÁ¿£¬ÔÚÊÓͼÖÐͨ¹ý Environment ±êÇ©£¬·Ö±ð¶¨Ò忪·¢¡¢Ô¤ÑݺÍÉú²ú»·¾³¼ÓÔضÔÓ¦µÄ×ÊÔ´Îļþ¡£
µ±ÔÚ¿ª·¢Ä£Ê½ÏÂÔËÐÐÓ¦ÓóÌÐò£¬ÎÒÃÇʹÓÃδѹËõCssºÍ½Å±¾Îļþ£»ÔÚÉú²ú»·¾³ÖУ¬ÎÒÃÇѹËõºóµÄ×ÊÔ´Îļþ£¬ÕâÑù¿ÉÒÔÌá¸ßÓ¦ÓóÌÐòµÄÐÔÄÜ¡£
×ܽáÔÚASP.NetÖпÉÒÔʹÓôò°üÓëѹËõÕâÁ½ÖÖ¼¼ÊõÀ´Ìá¸ßWebÓ¦ÓóÌÐòÒ³Ãæ¼ÓÔصÄÐÔÄÜ¡£Ï£ÍûÉÏÃæµÄÄÚÈݶԴó¼ÒµÄѧϰÓÐËù°ïÖú£¬Ð»Ð»£¡
²Î¿¼:
µÚÒ»´ÎʹÓÃMarkdownд²©¿Í£¬»¹²»ÊǺÜÏ°¹ß£¬ÅÅ°æ²»¹»ÕûÆ룬Çë´ó¼Ò¼ûÁ£¬Ð»Ð»£¡
תÔØÇë×¢Ã÷³ö´¦£¬ÔÎÄÁ´½Ó£º
¡¡