haar-loader
Allows wepback to import haar cascade xml (as produced by opencv_traincascade) as a JS module compatible with the haar-detect package (and https://github.com/mtschirs/js-objectdetect from which it is forked). The logic for the conversion was taken from this gist.
usage
...
module: {
rules: [
{test: /\.xml$/, use: 'haar-loader'},
...
import classifier from "haar!cascade.xml";
Webpack best practice says that loaders should do one thing only, and this kinda does two, parse XML, convert data to a classifier. Perhaps I should have used the xml-loader in a chain, but that seems excessive to require it of the users. This loader has a very specific use-case.