小编Ale*_*ciu的帖子

使用 postcss 分号或块预期错误 svelte

我已经建立了一个带有 Snowpack 的 svelte 项目,其中我尝试使用顺风进行样式设置,但是使用悬停或焦点等状态会导致 VS Code 抛出错误

Semicolon or block is expected

If you expect this syntax to work, here are some suggestions:
If you use less/SCSS with `svelte-preprocess`, did you add `lang=\"scss\"`/`lang=\"less\"` to your `style` tag? If you use SCSS, it may be necessary to add the path to your NODE runtime to the setting `svelte.language-server.runtime`, or use `sass` instead of `node-sass`.
Did you setup a `svelte.config.js`? 
See https://github.com/sveltejs/language-tools/tree/master/docs#using-with-preprocessors for more info.
Run Code Online (Sandbox Code Playgroud)

导致问题的一个代码示例是

<style lang="postcss">
  button {
    @apply …
Run Code Online (Sandbox Code Playgroud)

css postcss svelte tailwind-css snowpack

5
推荐指数
0
解决办法
1854
查看次数

标签 统计

css ×1

postcss ×1

snowpack ×1

svelte ×1

tailwind-css ×1