webpack
2017-09-27 本文已影响0人
野薇薇
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin')
module.exports = {
devtool: 'inline-source-map',
//单个入口文件
/* entry: './src/index.js',
output: {
filename: '[name].bundle.js',
path: path.resolve(__dirname, 'dist')
},*/
entry:{
app:'./src/index.js',
print:'./src/print.js'
},
output: {
filename: "[name].bundle.js",
path: path.resolve(__dirname,'dist')
},
devServer: {
contentBase:'./dist'
},
module: {
rules: [
{
test:/\.css/,
use:['style-loader','css-loader']
}
]
},
plugins: [
new HtmlWebpackPlugin({
title: 'Output Management'
})
],
};