I have a big project with different types of dependencies in it: js, scss, svg, png, etc... My webpack is configured and bundles my code, I am happy with it.
But I want to get some kind of hash of all my dependencies (including binaries and all files formats). And what is most important: I do not want to build my code during this. For this purpose I need, for example, array of all files inside all of entry points or at least some kind of dependencies tree.
I tried to use pilation hook finishModules
, but it pletes after the pilation. Also tried some other hooks of piler, don't remember which exactly.
I tried to write loader, but it seems like by default there is only source code of high-level files (like entry points themselves).
I'd be happy to receive some direction to move with my problem.
I have a big project with different types of dependencies in it: js, scss, svg, png, etc... My webpack is configured and bundles my code, I am happy with it.
But I want to get some kind of hash of all my dependencies (including binaries and all files formats). And what is most important: I do not want to build my code during this. For this purpose I need, for example, array of all files inside all of entry points or at least some kind of dependencies tree.
I tried to use pilation hook finishModules
, but it pletes after the pilation. Also tried some other hooks of piler, don't remember which exactly.
I tried to write loader, but it seems like by default there is only source code of high-level files (like entry points themselves).
I'd be happy to receive some direction to move with my problem.
Share Improve this question asked Dec 24, 2018 at 14:21 soqsoq 2211 gold badge2 silver badges7 bronze badges 4- Why not utilize webpack stats? webpack.js/configuration/stats – felixmosh Commented Dec 24, 2018 at 18:53
- Because it can be received only after build, and I don't want to build. I want to get information if something changed to make decision, run build or not. – soq Commented Dec 25, 2018 at 5:16
-
do you need to know when some file is changed as
fs.watch()
does? – skyboyer Commented Dec 25, 2018 at 10:11 - No, I need to improve my deploy process like this: get some checksum of files, check if it changed (according to some saved checksum and bundles), and either run build or just get previously built bundles. – soq Commented Dec 26, 2018 at 6:33
1 Answer
Reset to default 12Seems like I can solve my problem using https://github./pahen/madge