模塊被標記上 [not cacheable],而且多打了很多未知模塊
為什么有的模塊被標記上 [not cacheable],而且多打了很多模塊 ,跟老師做的不一樣,現在做到處理完less

var?htmlWebpackPlugin?=?require('html-webpack-plugin');
var?path?=?require('path');
module.exports?=?{
????context:?__dirname,
????entry:?'./src/app.js',
????output:?{
????????path:?'./dist',
????????filename:?'js/[name].bundle.js'
????},
????module:?{
????????loaders:?[
????????????{
????????????????test:?/\.js$/,
????????????????loader:?'babel',
????????????????include:?path.resolve(__dirname,?'src'),????????????????
????????????????exclude:?path.resolve(__dirname,?'node_modules'),
????????????????query:?{
????????????????????presets:?['latest']
????????????????}
????????????},
????????????{
????????????????test:?/\.css$/,
????????????????loader:?'style!css?importLoaders=1!postcss'
????????????},
????????????{
????????????????test:?/\.less$/,
????????????????loader:?'style!css!postcss!less'
????????????}
????????]
????},
????postcss:?[
????????require('autoprefixer')({
????????????browsers:?['last?5?versions']
????????})
????],
????plugins:?[
????????new?htmlWebpackPlugin({
????????????filename:?'index.html',
????????????template:?'index.html',
????????????inject:?'body'
????????})
????]
}
2017-04-28
但是不清楚為什么會把lodash打包進去
2017-04-28
自問自答:發現好像是 include 和 exclude 的路徑寫的有問題
之前的 node_modules 和 src 不帶 / /