Previously, the file configuration appliesTo was only being read from the config parameter (the programatic config) if there was no configuration in package.json.
In the PR, I look to address this issue. Now, if appliesTo is set programatically it will override any existing value (such as package.json file configuration).
Configuration is taken first from data passed via options from browserify (either from b.transform(tr, opts) or from the command line. Configuration is then loaded from package.json. If configuration is found in both package.json and in data passed programatically, then keys from the programatic configuartion are copied over top of the configuration from package.json.
The appliesTo key will be stripped from the configuration before being passed to your transform (although it is available in the configData if you need it for some reason.) Note that
appliesTo will override the includeExtensions and excludeExtensions provided to any of the
make*Transform() functions.
Previously, the file configuration
appliesTo
was only being read from the config parameter (the programatic config) if there was no configuration in package.json.In the PR, I look to address this issue. Now, if
appliesTo
is set programatically it will override any existing value (such as package.json file configuration).Also, this PR aligns the behaviour of
appliesTo
with the current documentation (https://github.com/benbria/browserify-transform-tools/wiki/Transform-Configuration):