GithubHelp home page GithubHelp logo

hxlniada / webpack-hashed-chunkids Goto Github PK

View Code? Open in Web Editor NEW
16.0 3.0 3.0 11 KB

a plugin to help webpack to generate unique chunk id based on unique module id

JavaScript 100.00%
chunk webpack webpack-hashed-chunkids hash

webpack-hashed-chunkids's Introduction

webpack-hashed-chunkids

npm package npm downloads

a plugin to help webpack to generate unique chunk id based on module id

why

webpack has official plugins to generate a unique module id: module-identifiers

but what about chunk id? I can't find a solution.

what is chunk id? open a bundled file, you can find something like this:

webpackJsonp([117],{...})

and the number 117 is chunk id

dependencies

install

npm install webpack-hashed-chunkids --save-dev

features

  • generate unique chunk id based on unique module id

usage

const HashedChunkidsPlugin = require('webpack-hashed-chunkids');

plugins: [
    new webpack.HashedModuleIdsPlugin(),
    new HashedChunkidsPlugin({
        hashFunction: 'md5', // The hashing algorithm to use, defaults to 'md5'. All functions from Node.JS' crypto.createHash are supported.
        hashDigest: 'hex', // The encoding to use when generating the hash, defaults to 'hex'. All encodings from Node.JS' hash.digest are supported.
        hashDigestLength: 4 // The prefix length of the hash digest to use, defaults to 4.
    })
]

webpack-hashed-chunkids's People

Contributors

hxlniada avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

webpack-hashed-chunkids's Issues

License

Is there any chance that the license for this could be made MIT or BSD? As it stands, our company does not allow 3rd party dependencies that have ISC licenses.

License

Please, add mit license to this repo.

which webpack version at limit

I used in webpack version 1.15.0,but make err ,main.js:50 Uncaught TypeError: Cannot read property 'call' of undefined
at webpack_require (main.js:50)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.