webpack-contrib / file-loader

File Loader
MIT License
1.86k stars 255 forks source link

enhance publicPath and emitFile option #360

Closed wusiquan closed 4 years ago

wusiquan commented 4 years ago

Feature Proposal hope publicPath option support async function and emitFile option support function type, a function return bool, for user to decide whether to emit File.

Feature Use Case images uploaded to static server or cdn, related code could write in publicPath directly. Once a file has been uploaded, eg. check the start substring of publicPath in emitFile function, could not been emitted or it would add size of package

alexander-akait commented 4 years ago

Sorry it is out of scope file-loader, you can create a plugin for doing it