Open zyspec opened 4 years ago
same with css.min.map files for xbootstrap theme
@zyspec And for xswatch4 too?
Yes, we just need to look at all of the minimized .css and .js files to see if they need a map file included. The xswatch4 bootstrap.min.css doesn't need a map file but the bootstrap.bundle.min.js included with xswatch4 does. On Saturday, April 11, 2020, 12:08:40 PM CDT, alain01 notifications@github.com wrote:
@zyspec And for xswatch4 too?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
There is a complication with locating the map files for resouces accessed through browse.php.
As an example, jquery.jgrowl.min.js has a line that identifies the URL for the map file:
//# sourceMappingURL=jquery.jgrowl.map
If the jquery.jgrowl.min.js file was served directly, the browser would locate the jquery.jgrowl.map file using normal relative URL processing. However, we are pulling it using /browse.php, so the relative URL points to the site's top level, i.e. https://site.url/jquery.jgrowl.map
To locate a map file in the xoops_lib/Frameworks we would need to use something like this:
//# sourceMappingURL=browse.php?Frameworks/jquery/plugins/jquery.jgrowl.map
That URL would need to be either rewritten in the .js file or specified in a "SourceMap" HTTP header.
I am still looking at this, but I just wanted to mention that it is more complicated than just copying in the .map files for any resources served using browse.php.
To help with developer debug, etc. it would be useful to include the jquery map files when available. Specifically the jquery.jgrowl.map and the jquery.form.min.js.map files in the xoops_lib/Frameworks/jquery/plugins folder.
The files are small and help developers. Especially now that Chrome is complaining about the missing map files.