Skip to content

Commit

Permalink
feat(css): support sass compiler api and sass-embedded package (#1513)
Browse files Browse the repository at this point in the history
* feat(css): support sass compiler api and sass-embedded package

resolve #1512

vitejs/vite@1025bb6 の反映です。

* Update config/shared-options.md

Co-authored-by: Jun Shindo <46585162+jay-es@users.noreply.github.com>

---------

Co-authored-by: Jun Shindo <46585162+jay-es@users.noreply.github.com>
  • Loading branch information
shuuji3 and jay-es authored Jul 31, 2024
1 parent b5faa76 commit 69dfc5d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions config/shared-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ CSS モジュールの動作を設定します。オプションは [postcss-mod

CSS プリプロセッサーに渡すオプションを指定します。オプションのキーとしてファイルの拡張子を使用します。各プリプロセッサーでサポートされているオプションは、それぞれのドキュメントで確認できます:

- `sass`/`scss` - トップレベルのオプション `api: "legacy" | "modern"`(デフォルト `"legacy"`)で、使用する sass API を切り替えることができます。[オプション(legacy)](https://sass-lang.com/documentation/js-api/interfaces/LegacyStringOptions)、[オプション(modern)](https://sass-lang.com/documentation/js-api/interfaces/stringoptions/)。
- `sass`/`scss` - トップレベルのオプション `api: "legacy" | "modern" | "modern-compiler"`(デフォルト `"legacy"`)で、使用する sass API を切り替えることができます。最高のパフォーマンスを得るには、`sass-embedded` パッケージとともに `api: "modern-compiler"` を使用することをおすすめします。[オプション(legacy)](https://sass-lang.com/documentation/js-api/interfaces/LegacyStringOptions)、[オプション(modern)](https://sass-lang.com/documentation/js-api/interfaces/stringoptions/)。
- `less` - [オプション](https://lesscss.org/usage/#less-options)。
- `styl`/`stylus` - オブジェクトとして渡せる [`define`](https://stylus-lang.com/docs/js.html#define-name-node) のみサポートされています。

Expand All @@ -244,7 +244,7 @@ export default defineConfig({
},
},
scss: {
api: 'modern', // または "legacy"
api: 'modern-compiler', // または "modern", "legacy"
importers: [
// ...
],
Expand Down
2 changes: 1 addition & 1 deletion guide/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ Vite は最新のブラウザーのみを対象としているため、CSSWG ド

```bash
# .scss and .sass
npm add -D sass
npm add -D sass-embedded # または sass
# .less
npm add -D less
Expand Down

0 comments on commit 69dfc5d

Please sign in to comment.