Hi,
is it possible for the files to go thru the loaders? This way we can get fingerprinting of files, and etc.
Thanks
+1 on this - I have the same question. I'll post if I find a solution
Maybe? This needs some investigation, but for now, you can perform file content modifications using the transform option.
@kevlened how would that work?
For example, i want to compile a less file and then copy it into the build directory. (not using ExtractTextPlugin as I need to keep the files separate from one another and will link them in the html header using react-helmet only after a response from the server)
@zonika i'm searching for the same thing (i think). copy less files but transform them to css while keeping the same structure. have you found a solution?
Still relevant.
This is still needed. Because using a loader doesnt work if you don't require() or import the file anywhere into the app.
Any update on this?
@yuhr can you describe use case for this?
@evilebottnawi html-webpack-plugin does some kind of this. I want to use the same loaders to perform transforming arbitrary files that are not required by js as if they're required. For example I have src/*.md and want them to be transformed into dst/[name].html applying PostHTML plugins, with markdown-it-loader and posthtml-loader, and at the same time I have to require some other .mds that are transformed in the same way. I don't think it's simple that I need another system i.e. the transform option in order to achieve the same task as loaders.
Impossible due design reason, anyway we implement new hook in webpack for copy plugin before minimize step, it is allow to minimize/compress assets and change their in other hooks
Most helpful comment
@evilebottnawi
html-webpack-plugindoes some kind of this. I want to use the same loaders to perform transforming arbitrary files that are notrequired by js as if they'rerequired. For example I havesrc/*.mdand want them to be transformed intodst/[name].htmlapplying PostHTML plugins, withmarkdown-it-loaderandposthtml-loader, and at the same time I have torequiresome other.mds that are transformed in the same way. I don't think it's simple that I need another system i.e. thetransformoption in order to achieve the same task as loaders.