Skip to content

glena/webpack-custom-var-library-name-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

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'.

Install

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

Usage

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

var webpackConfig = {
    ...
    output: {
        path: path.join(__dirname, '../build'),
        filename: '[name].min.js',
        library: 'some-name',
        libraryTarget: 'umd',
        umdNamedDefine: true
    },
    ...
    plugins: [
        ...
        new CustomVarLibraryNamePlugin({
          name: 'someName'
        }),
        ...
    ],
    ...
};

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published