webpack-custom-var-library-name-plugin

1.0.2 • Public • Published

CustomVarLibraryNamePlugin

A WebPack hack plugin to allow to set a different module name to the var libraryTarget and the AMD/CommonJS when using libraryTarget:'umd'.

The latest relase adds the hability to change the file name and handle multiple bundle names.

Install

$ npm i --save-dev webpack-custom-var-library-name-plugin

Usage

var CustomVarLibraryNamePlugin = require('webpack-custom-var-library-name-plugin');

    plugins: [
        ...
        new CustomVarLibraryNamePlugin({
          name: 'var-name'
        }),
        ...
    ],
...
var CustomVarLibraryNamePlugin = require('webpack-custom-var-library-name-plugin');

    plugins: [
        ...
        new CustomVarLibraryNamePlugin({
          name: {
            'chunk-name': {
                var: 'var-name',
                file: 'file-name'
            }
          }
        }),
        ...
    ],
...

Readme

Keywords

none

Package Sidebar

Install

npm i webpack-custom-var-library-name-plugin

Weekly Downloads

138

Version

1.0.2

License

MIT

Last publish

Collaborators

  • glena