LoginSignup
0
0

More than 3 years have passed since last update.

VSCode で `.css` ファイルを PostCSS として読み込ませる

Posted at

こちらの stackoverflow に答えがありますが、あまり日本語の記事が見当たらないので残しておきます。
https://stackoverflow.com/questions/49981905/how-to-parse-css-files-as-postcss-in-vscode

1. VSCode の設定から "files.associations" を追加する

VSCode の Settings の Preferences から、設定用の json ファイルを開きます。

そしてそこに以下を追記します。

{
  "settings": {
    "files.associations": {
      "*.css": "postcss"
   }
  },
}

2. PostCSS の言語サポートプラグインをインストールする

1番だけだと、.css ファイルがただのテキストファイルのような表示で読み込まれてしまいます。

なので、PostCSS の言語サポートプラグインをインストールすることで、PostCSS用の表示を可能にします。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0