GithubHelp home page GithubHelp logo

kenny26 / webpack-md5-hash Goto Github PK

View Code? Open in Web Editor NEW

This project forked from erm0l0v/webpack-md5-hash

0.0 2.0 1.0 16 KB

Plugin to replace a standard webpack chunkhash with md5.

License: MIT License

JavaScript 97.59% HTML 2.41%

webpack-md5-hash's Introduction

webpack-md5-hash

NPM

Plugin to replace a standard webpack chunkhash with md5.

Installation

npm install webpack-md5-hash --save-dev

Usage

Just add this plugin as usual.

// webpack.config.js

var WebpackMd5Hash = require('webpack-md5-hash');

module.exports = {
    // ...
    output: {
        //...
        chunkFilename: "[chunkhash].[id].chunk.js"
    },
    plugins: [
        new WebpackMd5Hash()
    ]
};

Development

Setup Docker

Generate Docker files

  • Change versions on node and webpack in versions.json
  • Run ./build.js gen_docker to generate files

Run tests

  • Build Docker images docker-compose build
  • Run tests docker-compose up or docker-compose up | grep exited

Run tests for specific environment

Example: you need test code on node v0.12 and webpack v1.8

  • Build image docker-compose build test_n_0.12_w_1.8
  • Run tests docker-compose run --rm test_n_0.12_w_1.8

And now instead of standard value of chunkhash you'll get a md5 based on chunk's modules.

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.