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: only try to load external files with relative paths #487

Merged
merged 2 commits into from Feb 23, 2022

Conversation

kaisermann
Copy link
Member

@kaisermann kaisermann commented Feb 23, 2022

Closes sveltejs/kit#4062

The isValidLocalPath was checking the path validity the other way around (not remote). We should instead check if it's a valid local path (starts with . and doesn't contain interpolation).

Copy link
Member

@dummdidumm dummdidumm left a comment

Choose a reason for hiding this comment

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

Makes sense to me. I thought about whether or not this can be seen as a breaking change, but the existing behavior was unexpected, too, and the resolved file path in the /app.js case likely was wrong anyway, so I concluded that this is just a fix 👍

src/modules/utils.ts Outdated Show resolved Hide resolved
@kaisermann kaisermann merged commit 80d87ed into main Feb 23, 2022
@kaisermann kaisermann deleted the fix-external-files branch February 23, 2022 13:49
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.

Svelte preprocessor gives false message
3 participants