sveltejs / svelte-preprocess

A ✨ magical ✨ Svelte preprocessor with sensible defaults and support for: PostCSS, SCSS, Less, Stylus, Coffeescript, TypeScript, Pug and much more.
MIT License
1.76k stars 151 forks source link

fix: only try to load external files with relative paths #487

Closed kaisermann closed 2 years ago

kaisermann commented 2 years ago

Closes https://github.com/sveltejs/kit/issues/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).