-
Notifications
You must be signed in to change notification settings - Fork 22
Incorrectly finds goog.require
and goog.provide
statements in comments
#16
Comments
Hi, thanks for the info and good point. I'll have to think about this a while. Any suggestions. I could try parsing files with babylon or acorn or something similar, but I guess that would be slower and might fail on files that contain syntax errors. Also I don't know anything about JS parsers yet so it would probably take a lot of time I don't have right now. I will leave this open for now and might come back to it later. But PRs are welcome. |
Something I did during my experiments to get the loader working for I'm going to go clean this up (since this probably still misses some stuff, and the /g flag might not be necessary), but this seems robust enough at least for my needs. |
You could strip out the comments at matching time. |
hello |
says a guy 3 years later 😢 |
This is a workaround for the issue mxmul#16 "Incorrectly finds `goog.require` and `goog.provide` statements in comments"
This is a workaround for the issue mxmul#16 "Incorrectly finds `goog.require` and `goog.provide` statements in comments"
This is a workaround for the issue mxmul#16 "Incorrectly finds `goog.require` and `goog.provide` statements in comments"
The simple regex approach incorrectly finds
goog.require
andgoog.provides
statements that are within JavaScript comments, which can break compilation in certain situations.The text was updated successfully, but these errors were encountered: