utils for webpack loaders