I'm using `-Xir-per-module` to get individual JS f...
# javascript
j
I'm using
-Xir-per-module
to get individual JS files for each library. Is it possible to have webpack run on each of them and produce a mirrored output in terms of file structure just with the contents individually optimized?
Seems like I would need to specify every file as an entry where I suspect the default is to just specify the root
I think I just need to run swc or something myself
t
Do you need multiple JS output files as result?
j
yes
t
From 1 subproject? Isolated?
j
i'm not sure what you're asking.
i get about 50 files by specifying ir-per-module and i want to optimize them individually
webpack is ultimately a bundler and so you cannot really bypass its bundling step of dependencies
even if i load all 50 files as entries in the webpack config i get 50 files out but they're all bundled with their dependency graph
t
even if i load all 50 files as entries in the webpack config i get 50 files out but they’re all bundled with their dependency graph
You can mark dependencies as “external” in webpack Webpack won’t include them in bundle
j
That would mean I would have to maintain 50 webpack configs
t
I supposed, that it will be common list (1 for all)
Or even
*
or custom “is external” test function - if it’s supported by Webpack