You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As discussed, I would like to be able to provide a config field include, f.e.:
requireCommonjs:include:"/vendor/specialLib"
This would be that although vendor folders are excluded from the commonjs wrapping, the specialLib folder would be wrapped if appropriate.
I looked into implementing this, and I can see that this code:
ifmimosaConfig.requireCommonjs?.excludeRegex?andfile.inputFileName.matchmimosaConfig.requireCommonjs.excludeRegex# skipping via regexelseifmimosaConfig.requireCommonjs.exclude.indexOf(file.inputFileName) >-1# skipping via string
is repeated across several modules. Could we simplify the API? It is also not clear from the module code that its actually the validator that does the necessary work of converting array of regexes into a single regex (maybe that's just because it didn't evoke "validation").
I think there can be (and probably are) different exclude fields, so I'd imagine something like:
ifmatcher=mimosa.configHelpers.excludesmimosaConfig.someModule, "excludeFoos", "includeFoos", file
logger.debug"skipping bar wrapping for %path, file is excluded via #{matcher}", file
The text was updated successfully, but these errors were encountered:
As discussed, I would like to be able to provide a config field
include
, f.e.:This would be that although vendor folders are excluded from the commonjs wrapping, the
specialLib
folder would be wrapped if appropriate.I looked into implementing this, and I can see that this code:
is repeated across several modules. Could we simplify the API? It is also not clear from the module code that its actually the validator that does the necessary work of converting array of regexes into a single regex (maybe that's just because it didn't evoke "validation").
I think there can be (and probably are) different exclude fields, so I'd imagine something like:
The text was updated successfully, but these errors were encountered: