1.2.0 • Published 4 years ago

webpack-external-vendor-plugin v1.2.0

Weekly downloads
6
License
ISC
Repository
github
Last release
4 years ago

webpack-external-vendor-plugin

  • can captiable with html-webpack-plugin@4

  • for webpack 4.0 useful for some libiaries which are included globally,it will inject global variables in webpack,then all deps can use external modules

Usage

const ExternalVendorPlugin = require('webpack-external-vendor-plugin')

// webpack.config.js
{
  // use webpack.externals options
  externals:{
    'vue':'window.Vue',
    'jquery':'window.jQuery',
    'babel-polyfill': 'window._babelPolyfill'
  },
  plugins: [
    new ExternalVendorPlugin({
      filename: 'static/[name].js?[hash:7]', // default [name].js
      // notice all js files you need include the browser version
      entry: {
        base_vendors: [
          'jquery/dist/jquery.min',
          'vue/dist/vue.js',
          'babel-polyfill/dist/polyfill.min.js'
        ],
        base_style:[
          
        ]
      }
    })
  ]

  //...
}

options.externals see webpack.externals

1.2.0

4 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.0

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago