webpack4-mpvue-optimize-plugin

1.0.0 • Public • Published

webpack4-mpvue-optimize-plugin

Webpack4 optimize support for mpvue

功能

  • 修正Webpack4提取公共模块后,全局变量不正确的问题

安装

npm install webpack4-mpvue-optimize-plugin --save-dev

使用

webpack.config.js

const MpvueOptimizePlugin = require('webpack4-mpvue-optimize-plugin');
 
module.exports = {
  // ... Webpack 相关置配
  optimization: {
    splitChunks: {
      cacheGroups: {
        vendor: {
          name: 'common/vendor',
          minChunks: 2,
          chunks: 'initial',
          priority: 10,
          enforce: true
        }
      }
    },
    runtimeChunk: {
      name: 'common/manifest'
    }
  },
  plugins: [
    new MpvueOptimizePlugin()
  ]
}

Package Sidebar

Install

npm i webpack4-mpvue-optimize-plugin

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

2.08 kB

Total Files

3

Last publish

Collaborators

  • bugkun