-
Notifications
You must be signed in to change notification settings - Fork 117
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
Remove inline sourcemap if largeFile is activated #267
Comments
Try version 2.2.2 or 1.9.2 . If you use |
@nmccready thank you for the advice! I had a try with version 2.2.2 and the current version 2.4.0. Unfortunately, for both the original sourcemap was not removed, if largeFile was enabled. If this option was disabled (and I didn't get the call stack error), the sourcemap was removed as expected. In the current codebase at least in init/index.internals.js#L91 the removal of the sourcemap is disabled for largeFile enabled. Where exactly is the part that should remove the sourcemap for enabled largeFile? Perhaps that can help me to find the cause for my issue... |
@DSoko2 can you provide a repository that reproduces this? I'd like to run some experiments. |
@phated I appreciate your plan! Unfortunatelly, the project where I am facing this issue is closed source due to our company restrictions. I will try my very best to provide you an easy example ASAP, but I am currently very busy. Hope to get it done during the weekend, if you should have helped yourself out meanwhile, please drop me a short note. |
I'd still like a reproduction repository, but while digging into |
Awesome... Funny thing is the large file option should be the default. I
remember reading the code and it was definitely a better approach with that
option.
|
@nmccready it looks like someone "improved" the RegExp to be less greedy (my terminology might be incorrect here) so that it realizes it doesn't match early and avoids blowing the stack but they removed the lastIndex stuff at the same time. Hopefully I hear back from them sooner than later. |
@DSoko2 can you update your dependencies (to get the latest version of |
@phated I had a try with the current versions. Unfortunately, I'm facing the same results as described in my initial post... |
Using the following gulp pipeline, I'm facing the issue that the resulting bundle still contains the inline sourcemap, which was generated by rollupjs (more precise rollup-stream). At the same time the external sourcemap file is generated, written to directory and linked in the app.js-file correctly. If I deactivate the largeFile option, the result is the same, but the inline sourcemap becomes removed from my app.js-file, which is the behavour I would expect. Unfortunately, I cannot deactivate the largeFile option for my project, because the regex that is used by convert-source-map otherwise causes the build to crash due to a "Maximum call stack size exceeded" error.
My pipeline:
I already had a short look into the code of gulp-sourcemaps and into the code of convert-source-map. Unfortunately, the seen behavior is a valid implementation, because the function that removes the inline sourcemap usually is based on the regex that tends to cause a "Maximum call stack size exceeded" error with large files :/
I would be very happy, if we could find a smart solution for this problem :)
The text was updated successfully, but these errors were encountered: