search

Home  >  Q&A  >  body text

javascript - Use webpack to package and propose public vue. Why does the size become larger?

{
  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?

阿神阿神2771 days ago600

reply all(2)I'll reply

  • 女神的闺蜜爱上我

    女神的闺蜜爱上我2017-06-12 09:30:50

    Try this

    names: ['vendors', 'manifest'] 

    reply
    0
  • 我想大声告诉你

    我想大声告诉你2017-06-12 09:30:50

    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

    reply
    0
  • Cancelreply