Version 3.1.0 of django-pipeline looks like it is producing JS which isn't valid.
My input JS file has code like this (initial contents of eval() removed for simplicity):
eval("... return range;\n}\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://indigo/./node_modules/dom-anchor-text-position/lib/index.js?");
That is being transformed by django-pipeline into this (note the /# sourceURL at the end should be //# but is now /#):
eval("... return range;\n}\n//# sourceMappingURL=lib/index.js.map\n\n/# sourceURL=webpack:/indigo/node_modules/dom-anchor-text-position/lib/index.js?");
The problem is that /# is now interpreted as a regular expression, not as a comment, which causes the call to eval() to fail, because it's not a valid regex:
/# sourceURL=webpack:/indigo/node_modules/dom-anchor-text-position/lib/index.js?
Reverting to 3.0.0 fixes the problem.
Version 3.1.0 of django-pipeline looks like it is producing JS which isn't valid.
My input JS file has code like this (initial contents of
eval()removed for simplicity):That is being transformed by django-pipeline into this (note the
/# sourceURLat the end should be//#but is now/#):The problem is that
/#is now interpreted as a regular expression, not as a comment, which causes the call toeval()to fail, because it's not a valid regex:Reverting to 3.0.0 fixes the problem.