Closed fliespl closed 2 months ago
It should be possible, but given how easy it is to load the page without being autoptimized (by adding ?ao_noptimize=1
to the URL) this is pretty low on my priority list really.
I understand being low on priority list (and that's fine).
I would like to give some additional comment to adding ?no_autoptimize
, which I of course utilize when needed, but is not a solution in the use case I have described.
When it comes to monitoring software (rollbar/sentry). Those are mostly used on production systems to notify website owners about errors that happened to visitors (specific url/action/browser).
This means - they will always be with served with minified content (because we want that on production systems). Source maps would make it possible for such tools to correctly pinpoint errors in unminified scripts.
Currently it's really hard since it mentions line 1, cause that's the only line in most cases :)
use case understood. if ever you want to help on this ping me here and I'll be happy to guide you/ provide feedback/ review and eventually merge a PR :-)
On 21/05/2022 21:07, fliespl wrote:
I understand being low on priority list (and that's fine).
I would like to give some additional comment to adding |?no_autoptimize|, which I of course utilize when needed, but is not a solution in the use case I have described.
When it comes to monitoring software (rollbar/sentry). Those are mostly used on production systems to notify website owners about errors that happened to visitors (specific url/action/browser).
This means - they will always be with served with minified content (because we want that on production systems). Source maps would make it possible for such tools to correctly pinpoint errors in unminified scripts.
Currently it's really hard since it mentions line 1, cause that's the only line in most cases :)
— Reply to this email directly, view it on GitHub https://github.com/futtta/autoptimize/issues/383#issuecomment-1133753505, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABMIMKPO7YWRGW4CRNQ47LVLEX65ANCNFSM5WQPB7JA. You are receiving this because you commented.Message ID: @.***>
If you could just point me into proper direction, I would appreciate that :) I am working mostly as BE dev/SysAdmin, so not really familiar with all frontend stuff. Are there any libs, I can look at?
https://github.com/koala-framework/sourcemaps could be useful (maybe others). and you would need to call that somewhere around https://github.com/futtta/autoptimize/blob/beta/classes/autoptimizeScripts.php#L362-L365 probably.
On 21/05/2022 21:41, fliespl wrote:
If you could just point me into proper direction, I would appreciate that :) I am working mostly as BE dev/SysAdmin, so not really familiar with all frontend stuff. Are there any libs, I can look at?
— Reply to this email directly, view it on GitHub https://github.com/futtta/autoptimize/issues/383#issuecomment-1133758063, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABMIMJEZIH2TLRV7AAOLW3VLE37XANCNFSM5WQPB7JA. You are receiving this because you commented.Message ID: @.***>
After 1h of checking, I get it now, why it's low on priority list :)
Your proposed library won't work since it would require a lot of custom coding.
I think (haven't tested) that switching to some other css/js minification library might be more promising (found this one: https://github.com/wikimedia/minify) and then adjust lines with final code. Don't know if possible, but hopefully will look into it when I have some free time.
So wikimedia's minify has builtin support for sourcemaps you mean?
It seems that way, but it's recent addition and haven't tested it, so will let you know once I get to it :)
Also looked at this one (as standalone now - not part of the library) - will take some time to propose PR since this change is also not immediate one and requires some more testing.
I am curious if it's possible to add sourcemap generation when minifying and combining files?
Might be worthy as an addition when using monitoring system like rollbar (which would make it possible to troubleshoot issues more easily than with minified content):
https://ss.codeone.pl/ss-2022-05-20-22-16-46-1653077806-IrkWsUSH.png