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
Add sourcemaps on ClosureCompilerFilter #815
Conversation
This flag can be used in order to prevent the grouping of files
please help me understand this. this PR
|
Hello,
Now I use this code in production an it work fine. I will change the variables names as sun as possible. |
ref #438. closing due to inactivity. as far as i can see (correct me if i'm wrong), this PR makes the clojure compiler output sourcemaps into files, appends that as a base64 data url to the js file, and then decodes the base64 data, writes it to a file, and replaces the data url with a url pointing to that file. i think this is the wrong approach, a better one would make the compiler put the source map more directly into the storage. having said that, i would appreciate any new attempt at this, although i'm still not sure how we should handle the different supported compilers, e.g. the default rjsmin doesn't even support sourcemaps. |
I'm sorry for my inactivity, but, even though I use this code in production, I opted for a more usable approach, so I don't spent other time on this develop. Surely my approach is not the best but, if I remember, CosureCompiler can't write source maps in a separated file. Anyhow, write directly on a storage require a big refactor of the Compressor's logics. In other words, this is a workaround but work for my purpose. |
yeah, "require a big refactor" would also be my first guess. however, django-compressor is quite complex and hard to maintain as it is, and bolting on more workarounds will only worsen this :) |
In order to use opbeat-plain-JS to track JavaScript errors, I added a few features for sourcemaps files creation using the ClosureCompilerFilter.
I also add some test for this part.