Skip to content

lkrocek/short-named-modules-webpack-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

webpack-shortNamedModulesPlugin

This plugin was inspired by NamedModulesPlugin. When sparse array of modules generated by webpack is not good for some browsers, so then is good to generate names of modules.

What is different from NamedModulesPlugin?

In projects where is used about 400 modules or more their IDs was generated by path and filename like it was defined in source files that mean it has in production build over 60KB when you use NamedModulesPlugin for this case was made this plugin to reduce size.

Where is good to use NamedModulesPlugin or this one?

  • Maple 2011 (older browser based on Gecko, near to Firefox 2.5)
  • IE 8 and below (webpack/webpack#2063)

Install

npm i https://github.com/lkrocek/short-named-modules-webpack-plugin.git -D

Usage

in webpack.config.js file:

var ShortNamedModulesPlugin = require('short-named-modules-webpack-plugin');
...
module.exports = {
    ...
    plugins: [
        new ShortNamedModulesPlugin()
    ],
};

That's it :-), happy coding.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published