1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
var webpack = require("webpack");
var ExtractTextPlugin = require("../");
module.exports = {
entry: {
a: "./entry.js",
b: "./entry2.js"
},
output: {
filename: "[name].js?[hash]-[chunkhash]",
chunkFilename: "[name].js?[hash]-[chunkhash]",
path: __dirname + "/assets",
publicPath: "/assets/"
},
module: {
loaders: [
{ test: /\.css$/, use: ExtractTextPlugin.extract({
fallback: "style-loader",
use: {
loader: "css-loader",
options: {
sourceMap: true
}
},
publicPath: "../"
}) },
{ test: /\.png$/, loader: "file-loader" }
]
},
devtool: "source-map",
plugins: [
new ExtractTextPlugin({
filename: "css/[name].css?[hash]-[chunkhash]-[contenthash]-[name]",
disable: false,
allChunks: true
}),
new webpack.optimize.CommonsChunkPlugin({ name: "c", filename: "c.js" })
]
};
|