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: svelte version detection was broken #495

Merged
merged 1 commit into from
Nov 14, 2022
Merged

Conversation

dominikg
Copy link
Member

#490 introduced svelte version testing that didn't work as desired. inverted the condition and also updated the value used by esbuild plugin to inject css.

@dominikg dominikg mentioned this pull request Nov 12, 2022
@@ -43,7 +43,7 @@ async function compileSvelte(
): Promise<string> {
let css = options.compilerOptions.css;
if (css !== 'none') {
css = isCssString ? 'inject' : true;
css = isCssString ? 'injected' : true;
Copy link
Member

Choose a reason for hiding this comment

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

I missed this too 😅 Didn't expect it to be past-tense.

Comment on lines -35 to +36
return compareToSvelte(version) >= 0;
const result = compareToSvelte(version) <= 0;
return result;
Copy link
Member

Choose a reason for hiding this comment

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

took me a while to grasp why but makes sense now. nice catch

Copy link
Member Author

Choose a reason for hiding this comment

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

still mad at myself for this one

@dominikg dominikg merged commit be3d46d into main Nov 14, 2022
@dominikg dominikg deleted the fix/svelte-version-detect branch November 14, 2022 06:12
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.

2 participants