loader-cased-file
This is a wrapper for webpack's file-loader
that
can be used to modify the casing of the resulting filename. This is useful e.g. when using a
content delivery network (CDN) that only allows lowercase filenames.
installation
npm install @microsoft/loader-cased-file --save-dev
Usage
The only additional functionality this loader offers is a :lower
attribute on the [name]
filename
template placeholder that forces the filename to be lowercased in the resulting bundle.
Example
require("@microsoft/loader-cased-file?name=[name:lower]_[hash].[ext]!asset.png");