1 webpack是一款很好用的構建工具css
2 相比其餘構建工具,webpack的特色在於webpack能把任何類型的資源模塊轉換爲.js代碼塊實現與其餘模塊的合併和加載。html
3 webpack經過loader來實現上述的轉換。經過loader來實現轉換其餘資源到JavaScript代碼。webpack
4 webpack plugins插件,plugin的存在能夠看作是實現那些loader實現不了或者不適合在loader中實現的功能。git
5 webpack.config.js 配置github
var path = require("path"); // var HtmlWebpackPlugin = require("html-webpack-plugin"); // 插件使用 module.exports = { entry: path.join(__dirname, "index"), output: { path: __dirname, filename: "bundle.js" }, module: { loaders: [{ test: /\.css$/, loaders: ["style", "css"] }] }, plugins: [ // new HtmlWebpackPlugin({ // title: "use plugin" // }) ] }
6 其餘,webpack-dev-server使用web