Open
Description
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.
- Here is my input file: https://github.com/laws-africa/indigo/blob/master/indigo_app/static/lib/external-imports.js
- Here is my pipeline config: https://github.com/laws-africa/indigo/blob/master/indigo/settings.py#L288
Metadata
Metadata
Assignees
Labels
No labels