Skip to content
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] check for private var usage in client code instead of server code #7487

Merged
merged 6 commits into from
Nov 4, 2022

Conversation

benmccann
Copy link
Member

@benmccann benmccann commented Nov 3, 2022

Fixes #7288

Don't put the module into the graph with ssrLoadModule which will add the server-side code, but instead use ensureEntryFromUrl leaving the ssr parameter undefined

@changeset-bot
Copy link

changeset-bot bot commented Nov 3, 2022

🦋 Changeset detected

Latest commit: e39a673

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sveltejs/kit Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@benmccann benmccann changed the title [chore] separate module resolving and loading [fix] check for private var usage in client code instead of server code Nov 3, 2022
Copy link
Member

@bluwy bluwy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Make sense to move ssrLoadModule only after checking the illegal imports.

@dummdidumm
Copy link
Member

Could we add some comments explaining why we use this other method, and use resolveSSRModule only after checking the graph? Someone without context could later come back to this code and think "oh let's move that duplicated code into that resolve function"

@benmccann
Copy link
Member Author

ok. I added a couple comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants