name-all-modules-plugin
Names all remaining modules that do not get named via NamedModulesPlugin
Names all remaining modules that do not get named via NamedModulesPlugin
License: MIT License
Names all remaining modules that do not get named via NamedModulesPlugin
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;
}
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)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.