-
Notifications
You must be signed in to change notification settings - Fork 672
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
Re-running r.js gives parse error for first dependency #182
Comments
Do you have a test case I can try? I tried with a simpler project here, but I do not see the issue. I think it may be related to how uglify uglifies the code the first time. Feel free to pass it to me off list if it should be private. |
jrburke, I think I have a similar issue and do have a test project, see : #187 -Bill |
Apologies for not being more thorough initially. First of all, it seems wrong to me to trace module dependencies using the uglified files in the output folder of a previous run. Maybe this is for performance reasons? Second, this configuration I added led to identifying the issue:
The first time I run (So after the first run, with this configuration I have, the The problem in the end is (besides my error-prone regexp) that this function is executed using different code (in first vs. consecutive runs). Let me know if you still need a test case. Edit: I'm also willing to dive into your sources and offer a pull request. |
@webpro thanks for the extra info. Your feedback has brought me around to by default removing the build dir before each build run, and have an opt in option to keep it. I think more people are hitting this issue now that the onBuild* processors are available. I opened #191 to track the specific code change now that we have identified a path for it. @pixelhandler I will follow up in #187 on that issue. Thanks for the repo that I can pull to try out the problem, I will be doing that shortly. I'll close this bug now that we have the more targeted #191, and I'll follow up in #187 separately. Put a comment in #191 if you want to get notified when it is fixed so that you can try out the r.js snapshot that will go with the fix. |
When re-running
r.js
with the configured outputdir
not being empty (i.e. when runningr.js
without first removing this directory), I get the following error:When I simply remove the output directory first, everything runs fine. Perhaps best to simply remove/empty the directory before tracing dependencies. (Although this could actually be another, more serious bug.)
The text was updated successfully, but these errors were encountered: