Git Product home page Git Product logo

name-all-modules-plugin's Introduction

name-all-modules-plugin

Names all remaining modules that do not get named via NamedModulesPlugin

name-all-modules-plugin's People

Contributors

timse avatar

Stargazers

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

Watchers

 avatar

name-all-modules-plugin's Issues

MultiModule.identifier can have absolute paths

The edge case this plugin targets is MultiModule. However a MultiModule can have dependencies that are absolute paths to some modules. Thus identifier() would have those absolute paths which breaks hash stability when path of the project is different across compilations.

Although there's a way to prevent it in user-land using aliases, perhaps this plugin can try to handle it. Something along these lines

var createHash = require("crypto").createHash;

function myIdentifier(module) {
  // SingleEntryDependency.module is always a NormalModule with id?
  var id = module.dependencies.map(singleEntryDep => singleEntryDep.module && singleEntryDep.module.id).join('.');
  if (id.length > 16) {
    var hash = createHash('md5');
    hash.update(id);
    return hash.digest('base64').substr(0, 16);
  }
  return id;
}

DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead

Using [email protected]:

(node:34067) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
    at NameAllModulesPlugin.apply (…/node_modules/name-all-modules-plugin/index.js:5:14)
    at webpack (…/node_modules/webpack/lib/webpack.js:47:13)
    at …/webpack/compiler.js:63:22
    at Promise._execute (…/node_modules/bluebird/js/release/debuggability.js:313:9)
    at Promise._resolveFromExecutor (…/node_modules/bluebird/js/release/promise.js:483:18)
    at new Promise (…/node_modules/bluebird/js/release/promise.js:79:10)
    at compile (…/webpack/compiler.js:61:10)
    at module.exports.type (…/compile.js:18:10)

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.