Webpack入門教程二十四

來源:互聯網
上載者:User

標籤:webpack入門教程二十四

116.輸出HtmlWebpackPlugin.files中的內容,修改模板檔案index.html,代碼如下
<!DOCTYPE html><html><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><title>webpack demo</title><link rel="stylesheet" href=""></head><body><% for (var key in htmlWebpackPlugin.files) {%><%= key %> : <%= JSON.stringify(htmlWebpackPlugin.files[key]) %><% } %></body></html>
117.使用cnpm run webpack命令重新打包

650) this.width=650;" src="https://s4.51cto.com/wyfs02/M01/8D/C9/wKiom1iqrXWiacBnAABGpwp_hQM417.png-wh_500x0-wm_3-wmp_4-s_884700443.png" title="117.png" alt="wKiom1iqrXWiacBnAABGpwp_hQM417.png-wh_50" />

118.查看產生的index-9b7e6d15108bc45c5cbd.html檔案輸出的內容

650) this.width=650;" src="https://s4.51cto.com/wyfs02/M00/8D/C9/wKiom1iqrbXQ7xJ5AADMDgp72Qg126.png-wh_500x0-wm_3-wmp_4-s_2737835431.png" title="118.png" alt="wKiom1iqrbXQ7xJ5AADMDgp72Qg126.png-wh_50" />

本文出自 “素顏” 部落格,請務必保留此出處http://suyanzhu.blog.51cto.com/8050189/1899525

Webpack入門教程二十四

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.