-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
fix(ssrTransform): continuous exports parsing error #6407
Conversation
I think there are other kinds of exports that are still failing with this solution. Try adding this to the end of
Result will be:
|
Not an elegant solution, but it does the trick, it is better to find the root cause and fix it, see my #6395 (comment) |
As described in my verbose #6395 (comment) I think the (mis)use of The I believe the result is cleanest with only the (I'd be happy to provide a patch or a separate PR if that would be the best way.) |
@neb Good catch! But what do you mean about this:
I feel like I've already done this ( |
@ygj6 Sorry I wasn't clearer about that part! My point was the changes of |
@neb Sorry I misunderstood you earlier, now that I understand, I pushed the latest code, let's see if that's correct. |
`\nObject.defineProperty(${ssrModuleExportsKey}, "${name}", ` + | ||
`{ enumerable: true, configurable: true, get(){ return ${local} }});` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ygj6 This version works for me, thanks!
The only other very small thing I'd suggest is to move the \n
from the beginning to the end of the appended string or just add another one at the end. This obviously wouldn't affect execution and is thus not necessary, but }});function fn2() {
in the snapshot would be more legible with a newline after the ;
. Just a thought.
Either way, glad to get to the bottom of this bug!
Edit: Oops I didn't mean to leave this comment as a review. I don't count as a real reviewer of course.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @neb, thanks for your review and input on this PR! If you think that this can be further improved, please create a new PR, and let's discuss the addition of the new line out of the context of this bug.
Description
fix: #6395
Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).