尊龙凯时人生就是搏

Laravel¿ª·¢£ºÔõÑùʹÓÃLaravel Mix±àÒëÇ°¶Ë×ʲú£¿

laravelÊÇÒ»¿îºÜÊÇÊ¢ÐеÄphp¿ò¼Ü£¬ÆäÇ¿Ê¢µÄ¹¦Ð§ºÍÎÞаµÄ¼Ü¹¹ÎüÒýÁËÐí¶à¿ª·¢ÕߵĹØ×¢¡£ÆäÖУ¬laravel mixÊÇlaravelµÄÒ»¸öÇ¿Ê¢µÄÇ°¶Ë¹¤¾ß£¬ËüÄܹ»×ÊÖúÎÒÃǸü±ã½ÝµØ´¦ÀíÇ°¶Ë×ÊÔ´¡£ÄÇô£¬ÔõÑùʹÓÃlaravel mix±àÒëÇ°¶Ë×ʲúÄØ£¿½ÓÏÂÀ´£¬ÎÒÃǽ«ÏêϸÏÈÈÝlaravel mixµÄʹÓÃÒªÁì¡£

ÔÚLaravelÖÐ×°ÖÃLaravel Mix

Ê×ÏÈ£¬ÎÒÃÇÐèÒªÔÚLaravelÖÐ×°ÖÃLaravel Mix¡£ÎÒÃÇ¿ÉÒÔʹÓÃÒÔÏÂÏÂÁîÀ´×°Öãº

npm install --save-dev laravel-mix

µÇ¼ºó¸´ÖÆ

´ËÏÂÁÔÚÏîÄ¿ÖÐ×°ÖÃLaravel Mix¡£

±àдWebpack.mix.jsÎļþ

×°ÖÃÍê³ÉLaravel MixÖ®ºó£¬ÎÒÃÇÐèÒª±àдWebpack.mix.jsÎļþ¡£¸ÃÎļþ°üÀ¨ÁËÎÒÃÇÒªÔËÐеÄʹÃüºÍÉèÖã¬ÀýÈçÎÒÃÇÒª±àÒëµÄJSºÍCSSÎļþ¡¢ËùʹÓõIJå¼þ¡¢Êä³öĿ¼µÈ¡£

ÎÒÃÇн¨Ò»¸öWebpack.mix.jsÎļþ²¢Ð´ÈëÒÔÏÂÄÚÈÝ£º

Á¬Ã¦Ñ§Ï°¡°Ç°¶ËÃâ·ÑѧϰÌõ¼Ç£¨ÉîÈ룩¡±£»

let mix = require('laravel-mix');

mix.js('resources/js/app.js', 'public/js')
   .sass('resources/sass/app.scss', 'public/css');

µÇ¼ºó¸´ÖÆ

ÕâÀÎÒÃÇʹÓÃÁËJavaScriptºÍSASSÕâÁ½ÖÖÇ°¶Ë±à³ÌÓïÑÔ¡£ÎÒÃÇ¿ÉÒÔƾ֤ÏÖʵÐèÒª¾ÙÐÐÐ޸ġ£

ÔËÐбàÒëÏÂÁî

дºÃWebpack.mix.jsÎļþÖ®ºó£¬ÎÒÃǾͿÉÒÔÔËÐбàÒëÏÂÁîÁË¡£ÎÒÃÇ¿ÉÒÔʹÓÃÒÔÏÂÏÂÁîÀ´ÔËÐбàÒ룺

npm run dev

µÇ¼ºó¸´ÖÆ

¸ÃÏÂÁ×Ô¶¯±àÒëÎÒÃÇÉèÖõÄ×ÊÔ´£¬°üÀ¨JavaScriptºÍSASSÎļþ¡£

ÌØÁíÍâ±àÒëÑ¡Ïî

Laravel Mix»¹Ö§³ÖÐí¶àÌØÁíÍâ±àÒëÑ¡Ïî¡£ÀýÈ磬ÎÒÃÇ¿ÉÒÔʹÓÃÒÔÏÂÏÂÁîÀ´×Ô¶¯¼àÌýËùÓÐÎļþµÄת±ä²¢¾ÙÐÐʵʱ±àÒ룺

npm run watch

µÇ¼ºó¸´ÖÆ

±ðµÄ£¬ÎÒÃÇ»¹¿ÉÒÔʹÓÃÒÔÏÂÏÂÁîÀ´¾ÙÐдúÂë´ò°ü£º

npm run production

µÇ¼ºó¸´ÖÆ

Õ⽫¶ÔËùÓÐ×ÊÔ´¾ÙÐÐÉú²ú¼¶±ðµÄ±àÒëºÍѹËõ£¬ÒÔÌá¸ßÍøÕ¾µÄÐÔÄܺͼÓÔØËÙÂÊ¡£

×ܽá

ÔÚ±¾ÎÄÖУ¬ÎÒÃÇÏÈÈÝÁËÔõÑùÔÚLaravelÖÐʹÓÃLaravel Mix±àÒëÇ°¶Ë×ʲú¡£Laravel MixÌṩÁ˺ÜÊDZã½ÝµÄ¹¤¾ßÀ´ÖÎÀíÇ°¶Ë×ÊÔ´£¬ïÔÌ­ÁËÎÒÃǵÄÇ°¶ËÊÂÇéÁ¿¡£Ï£Íû±¾ÎÄÄܹ»×ÊÖú¸÷È˸üºÃµØʹÓÃLaravel Mix¡£

ÒÔÉϾÍÊÇLaravel¿ª·¢£ºÔõÑùʹÓÃLaravel Mix±àÒëÇ°¶Ë×ʲú£¿µÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí£¬°æȨÕùÒéÓë±¾Õ¾Î޹أ¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í尊龙凯时人生就是搏ÂËÓÍ»úÍø¹Ù·½Ì¬¶È£¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ£¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢£¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢£¬ÇëÄúÁ¬Ã¦ÁªÏµ尊龙凯时人生就是搏ʵʱÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ尊龙凯时人生就是搏

18523999891

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎ壬9:30-18:30£¬½ÚãåÈÕÐÝÏ¢

QR code
sitemap¡¢ÍøÕ¾µØͼ