javascript - Use webpack to package and propose public vue. Why does the size become larger?
阿神
阿神 2017-06-12 09:28:50
0
2
592
{
  entry: {
   bundle: 'app'
   vendors: ['vue']
  }

  plugins: {
      new webpack.optimize.CommonsChunkPlugin({
        name     : 'vendors', 
        filename : 'vendors.js'
      })
  }
}

I want to mention vue to the public part
vue.js is about a little more than 200
The packaged vendors.js is more than 700k
Why is this?

阿神
阿神

闭关修行中......

reply all(2)
女神的闺蜜爱上我

Try this

names: ['vendors', 'manifest'] 
我想大声告诉你

The reason is known
devtool: 'eval-source-map',

Just replace it with
devtool: 'source-map',
and it'll be fine

After checking the information, I don’t really understand the difference between the various options of devtool

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template