3
HtmlWebpackPlugin無法正常輸出到輸出的WebPack導演:我有這樣的設置:HtmlWebpackPlugin無法正常輸出
var config = {
context: __dirname + '/client',
entry: {
main: [
"./app.js"
]
},
output: {
path: __dirname + "./public",
filename: "dist.js"
},
devtool: "source-map",
module: {
loaders: [
{
test: /\.js?$/,
loader: 'babel-loader',
include: [
path.resolve(__dirname, 'client'),
],
exclude: /node_modules/
},
{
test: /\.less$/,
loader: "style!css!less"
},
{
test: /\.css/,
loader: "style!css"
}
]
},
resolve: {
// you can now require('file') instead of require('file.js')
extensions: ['', '.js', '.json']
},
plugins: [
new HtmlWebpackPlugin({
title: 'Webpack demo'
})
]
}
但是沒有index.html文件輸出到公衆。
我剛剛得到這個消息:
Asset Size Chunks Chunk Names
dist.js 530 kB 0 [emitted] main
dist.js.map 638 kB 0 [emitted] main
index.html 181 bytes [emitted]
[0] multi main 28 bytes {0} [built]
+ 130 hidden modules
Child html-webpack-plugin for "index.html":
+ 3 hidden modules
其產生的index.html我可以在你的消息'的index.html 181個字節見[發出]' – Kasiriveni