scalableminds / amd-optimize

An AMD (RequireJS) optimizer that's stream-friendly. Made for gulp.
MIT License
162 stars 29 forks source link

Change of behaviour of map in config between 0.2.7 and 0.2.8 #26

Closed nathanmesserbbc closed 10 years ago

nathanmesserbbc commented 10 years ago

In 0.2.5, config like below worked:

paths: { 'module_name': './bower_components/path_to/my_module' }, map: { 'module_name': { 'jquery': 'jquery-1.9' } }

However as of 0.2.8 (not sure about inbetween), the map seems to want the relative path rather than the module name, giving something like.

paths: { 'module_name': './bower_components/path_to/my_module' }, map: { './bower_components/path_to/my_module': { 'jquery': 'jquery-1.9' } }

Is this intended?

nathanmesserbbc commented 10 years ago

Just to confirm, this is a change in behaviour between 0.2.7 and 0.2.8

normanrz commented 10 years ago

I reverted the behavior and added a regression test in 0.2.9. Thanks for spotting this!

nathanmesserbbc commented 10 years ago

Brilliant, thanks for looking at this so quickly