mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 17:37:50 +00:00
Cleanup "imports" template option.
Former-commit-id: f9f52b1f63908bcb7db7837a9bda067f2855acbb
This commit is contained in:
11
build.js
11
build.js
@@ -1398,8 +1398,8 @@
|
||||
source = removeVar(source, 'cloneableClasses');
|
||||
source = removeVar(source, 'ctorByClass');
|
||||
|
||||
source = removeVar(source, 'templateImports');
|
||||
source = source.replace(/,\s*'imports'.+/, '');
|
||||
// remove `_.templateSettings.imports assignment
|
||||
source = source.replace(/,[^']*'imports':[^}]+}/, '');
|
||||
|
||||
// remove large array optimizations
|
||||
source = removeFunction(source, 'cachedContains');
|
||||
@@ -1748,6 +1748,13 @@
|
||||
source = removeIsArgumentsFallback(source);
|
||||
}
|
||||
|
||||
// remove `iteratorTemplate` dependency checks from `_.template`
|
||||
source = source.replace(matchFunction(source, 'template'), function(match) {
|
||||
return match
|
||||
.replace(/iteratorTemplate *&& */g, '')
|
||||
.replace(/iteratorTemplate *\?([^:]+):[^,;]+/g, '$1');
|
||||
});
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
if (isLegacy) {
|
||||
|
||||
Reference in New Issue
Block a user