my webpack config is:
var path = require("path");
var webpack = require("webpack");
var HtmlWebpackPlugin = require('html-webpack-plugin');
var config = {
entry: {
render: ["./src/render/render.jsx"],
lib: ["react", "react-router", "flux", "object-assign", "microevent"]
},
output: {
publicPath: "/dist/",
path: "./dist",
filename: "scripts/[name].[chunkhash:8].js"
},
resolve: {
modulesDirectories: ["node_modules", "bower_components"]
},
module: {
loaders: [
{test: /\.(js|jsx)$/, loaders: ["babel"]},
{test: /\.less$/, loader: "style!css!less"},
{test: /\.(jpe?g|png|gif)$/, loader: "file?name=images/[hash:8].[ext]"}
],
noParse: []
},
plugins: [
new webpack.optimize.CommonsChunkPlugin({
name: "lib",
filename: "scripts/[name].[chunkhash:8].js"
}),
//new webpack.optimize.UglifyJsPlugin({
// compress: {
// warnings: false
// }
//}),
new HtmlWebpackPlugin({
inject: "head",
template: "./src/render/render-deploy.html",
filename: "render/render-deploy.html"
})
]
};
module.exports = config;
i use HtmlWebpackPlugin to insert scripts into my html to load js files, so i want to disable the feature of chunk loading in webpack ,what should i do ?
Hi, Let me know if anyone found the way to disable chunk loading.
I am also looking for this.