Support Regular Expressions and Arrays in cssImportIgnore#653
Support Regular Expressions and Arrays in cssImportIgnore#653sathomas wants to merge 1 commit intorequirejs:masterfrom sathomas:master
Conversation
…pression or array of strings/regexps
|
I think cssImportIgnore needs an overhaul in general: it should have just accepted an array in the build.js form and command line use should have fallen into the "needArray" conversion done in build.js. However, that is a larger, backwards incompatible change, so going to schedule this for 3.0. In the meantime though, the import inlining should skip URLs that begin with // as those indicate network URLs, which are not supported in the optimizer. If you do find those are slipping through now, then I would want to do a more targeted fix for that in the 2.x series. |
|
I wasn't aware that does ignore inlining for the import URL in the example. I thought that was just a quirk of the greedy regex matching algorithm, though. |
CSS file URLs may legitimately include commas. The recommended CSS for Google Web Fonts, for example, might look like:
This PR allows
cssImportIgnoreto support regular expressions and an array of strings or regular expressions in addition to the current format of a single "comma separated list."