Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 404 errors when opening developer tools (remove all *.js.map source mappings in merged JS) #6553

Closed
tsteur opened this issue Oct 29, 2014 · 1 comment
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@tsteur
Copy link
Member

tsteur commented Oct 29, 2014

Our JavaScript is loaded via index.php. Some of them contain source mapping information to still have readable code even when the loaded code is minified etc.

//# sourceMappingURL=angular.min.js.map

Problem is the map files are not in the root directory where it tries to load it because of index.php but in some folders like libs/.... Meaning whenever we open the developer tools it cannot load the map file. This leads to 404 errors which is not that bad but can be annoying if used with loganalytics etc.

Either we have to remove all such definitions when building the merged asset or fix the path to the merged asset. Fixing the path would actually only fix 404 issues but the mapping would still be broken as we merge multiple files into one and it would be no longer able to resolve variables to it's original value etc. So we would have to generate our own "mapping". This is something we probably don't want to build. Rather we should use a minified in the future that does this for us.

So best idea is to remove all such comments I think

@tsteur tsteur changed the title When generating merged assets, remove all *.js.map source mappings Fix 404 errors when opening developer tools (remove all *.js.map source mappings in merged JS) Oct 29, 2014
@tsteur tsteur added the Bug For errors / faults / flaws / inconsistencies etc. label Oct 29, 2014
@mattab
Copy link
Member

mattab commented Oct 29, 2014

So best idea is to remove all such comments I think

👍

@mattab mattab added this to the Piwik 2.10.0 milestone Oct 29, 2014
@tsteur tsteur closed this as completed Nov 7, 2014
@tsteur tsteur modified the milestones: Piwik 2.9.0, Piwik 2.10.0 Nov 7, 2014
@tsteur tsteur self-assigned this Nov 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

2 participants