mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 08:57:49 +00:00
Add require call to compiled templates.
Former-commit-id: 3d97f6cc71a3c7e6ac9b12cc876ace4790efbae8
This commit is contained in:
3
build.js
3
build.js
@@ -476,7 +476,7 @@
|
||||
|
||||
var source = [
|
||||
';(function(window) {',
|
||||
" var freeExports = typeof exports == 'object' && exports;",
|
||||
" var freeExports = typeof exports == 'object' && typeof require == 'function' && exports;",
|
||||
'',
|
||||
" var freeModule = typeof module == 'object' && module && module.exports == freeExports && module;",
|
||||
'',
|
||||
@@ -515,6 +515,7 @@
|
||||
' lodash.templates = lodash.extend(lodash.templates || {}, templates);',
|
||||
' });',
|
||||
" } else if (freeExports) {",
|
||||
" _ = require('" + options.moduleId + "');",
|
||||
" if (freeModule) {",
|
||||
' (freeModule.exports = templates).templates = templates;',
|
||||
' } else {',
|
||||
|
||||
Reference in New Issue
Block a user