Closed maximedupre closed 4 years ago
Having the same issue. It's only VSCode that complains. It can build it perfectly.
What I've tried:
which node
and copy/paste'd the path).ctrl + shift + p
and Svelte: Restart Language Server
)The style:
<style type="text/scss">
main {
h1 {
color: #ff3e00;
}
}
</style>
The error: on the line h1 {
Colon is expected svelte(css-syntax-error)
Same problem here.
I followed svelte-preprocess
instructions.
The scss is functional, but i'm still getting errors in VS Code.
Index.svelte
style:
<style lang="scss">
$color: orange;
p {
color: $color;
}
</style>
svelte.config.js
const sveltePreprocess = require('svelte-preprocess');
module.exports = {
preprocess: sveltePreprocess(),
};
Same problem here. Tried everything. but just cant get this to work. This highlight syntax sucks :/
Same problem.
After going through the code I figured the extension fails silently when svelte.config.js
is invalid, so be extra sure the file doesn't has any syntax errors. Also make sure the output looks like this:
> require("./svelte.config.js")
{
preprocess: {
markup: [AsyncFunction: markup],
script: [AsyncFunction: script],
style: [AsyncFunction: style]
}
}
Also, as a side note, SASS syntax is not supported, because it's not supported by vscode-css-languageservice. I'm not sure how pure .sass
files do it.
I get CSS errors in my SCSS style tag.
I followed the instructions in the doc, but I think it is incomplete since I have this error...
Cheers!