配置 webpack
在工作目錄的根目錄中建立檔案 webpack.config.js
檔名 :webpack.config.js
module.exports = {
entry: __dirname + "/src/index.jsx",
devtool: "source-map",
output: {
path: __dirname + "/build",
filename: "bundle.js"
},
module: {
loaders: [
{test: /\.jsx?$/, exclude: /node_modules/, loader: "babel-loader"}
]
}
}