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

feat(css): support sass compiler api and sass-embedded package #1513

Merged
merged 2 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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