Skip to content

Commit 755360b

Browse files
committed
Move require() up
1 parent 0f45e4e commit 755360b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tasks/lib/uglify.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
var path = require('path');
1313
var UglifyJS = require('uglify-js');
1414
var uriPath = require('uri-path');
15+
var domprops = require('uglify-js/tools/domprops');
1516

1617
// Converts \r\n to \n
1718
function normalizeLf(string) {
@@ -94,7 +95,7 @@ exports.init = function(grunt) {
9495
minifyOptions.mangle.properties.reserved = [];
9596
}
9697
if (options.reserveDOMProperties) {
97-
require('uglify-js/tools/domprops').forEach(function(name) {
98+
domprops.forEach(function(name) {
9899
UglifyJS._push_uniq(minifyOptions.mangle.properties.reserved, name);
99100
});
100101
}

0 commit comments

Comments
 (0)