-
Notifications
You must be signed in to change notification settings - Fork 27.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(sass): add docs for
implementation
property in sassOptions
…
…and update `sassOption` types (#70428) ## Why? We currently don't document the `implementation` property for `sassOptions`. Since this is one our maintained properties, we should also update the types for `sassOptions`. - Fixes #70020 --------- Co-authored-by: Zack Tanner <1939140+ztanner@users.noreply.github.com> Co-authored-by: JJ Kasper <jj@jjsweb.site>
- Loading branch information
1 parent
33c1eb7
commit a189a4d
Showing
5 changed files
with
107 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
docs/02-app/02-api-reference/05-next-config-js/sassOptions.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- | ||
title: sassOptions | ||
description: Configure Sass options. | ||
--- | ||
|
||
`sassOptions` allow you to configure the Sass compiler. | ||
|
||
```ts filename="next.config.ts" switcher | ||
import type { NextConfig } from 'next' | ||
|
||
const sassOptions = { | ||
additionalData: ` | ||
$var: red; | ||
`, | ||
} | ||
|
||
const nextConfig: NextConfig = { | ||
sassOptions: { | ||
...sassOptions, | ||
implementation: 'sass-embedded', | ||
}, | ||
} | ||
|
||
export default nextConfig | ||
``` | ||
|
||
```js filename="next.config.js" switcher | ||
/** @type {import('next').NextConfig} */ | ||
|
||
const sassOptions = { | ||
additionalData: ` | ||
$var: red; | ||
`, | ||
} | ||
|
||
const nextConfig = { | ||
sassOptions: { | ||
...sassOptions, | ||
implementation: 'sass-embedded', | ||
}, | ||
} | ||
|
||
module.exports = nextConfig | ||
``` | ||
|
||
> **Good to know:** `sassOptions` are not typed outside of `implementation` because Next.js does not maintain the other possible properties. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters