@@ -15,7 +15,7 @@ function nodeModulesPaths (start, cb) {
15
15
for ( var i = parts . length - 1 ; i >= 0 ; i -- ) {
16
16
if ( parts [ i ] === 'node_modules' ) continue ;
17
17
var dir = path . join . apply (
18
- path , parts . slice ( 0 , i + 1 ) . concat ( [ " node_modules" ] )
18
+ path , parts . slice ( 0 , i + 1 ) . concat ( [ ' node_modules' ] )
19
19
) ;
20
20
if ( ! parts [ 0 ] . match ( / ( [ A - Z a - z ] : ) / ) ) {
21
21
dir = '/' + dir ;
@@ -170,27 +170,27 @@ function build_resolve_opts(opts, base) {
170
170
171
171
var pathFilter = opts . pathFilter ;
172
172
opts . pathFilter = function ( info , path , relativePath ) {
173
- if ( relativePath [ 0 ] != '.' ) {
174
- relativePath = './' + relativePath ;
175
- }
176
- var mappedPath ;
177
- if ( pathFilter ) {
178
- mappedPath = pathFilter . apply ( this , arguments ) ;
179
- }
180
- if ( mappedPath ) {
181
- return mappedPath ;
182
- }
173
+ if ( relativePath [ 0 ] != '.' ) {
174
+ relativePath = './' + relativePath ;
175
+ }
176
+ var mappedPath ;
177
+ if ( pathFilter ) {
178
+ mappedPath = pathFilter . apply ( this , arguments ) ;
179
+ }
180
+ if ( mappedPath ) {
181
+ return mappedPath ;
182
+ }
183
183
184
184
var replacements = info [ browser ] ;
185
- if ( ! replacements ) {
186
- return ;
187
- }
188
-
189
- mappedPath = replacements [ relativePath ] ;
190
- if ( ! mappedPath && ( relativePath . lastIndexOf ( " .js" ) === relativePath . length - 3 ) ) {
191
- mappedPath = replacements [ relativePath + " .js" ] ;
192
- }
193
- return mappedPath ;
185
+ if ( ! replacements ) {
186
+ return ;
187
+ }
188
+
189
+ mappedPath = replacements [ relativePath ] ;
190
+ if ( ! mappedPath && ( relativePath . lastIndexOf ( ' .js' ) === relativePath . length - 3 ) ) {
191
+ mappedPath = replacements [ relativePath + ' .js' ] ;
192
+ }
193
+ return mappedPath ;
194
194
} ;
195
195
196
196
return opts ;
@@ -324,4 +324,3 @@ function getReplacements(info, browser) {
324
324
}
325
325
326
326
module . exports = resolve ;
327
-
0 commit comments