Skip to main content

sassOptions

sassOptions 允许你配置 Sass 编译器。

¥sassOptions allow you to configure the Sass compiler.

import type { NextConfig } from 'next'

const sassOptions = {
additionalData: `
$var: red;
`,
}

const nextConfig: NextConfig = {
sassOptions: {
...sassOptions,
implementation: 'sass-embedded',
},
}

export default nextConfig
/** @type {import('next').NextConfig} */

const sassOptions = {
additionalData: `
$var: red;
`,
}

const nextConfig = {
sassOptions: {
...sassOptions,
implementation: 'sass-embedded',
},
}

module.exports = nextConfig

很高兴知道:sassOptions 不在 implementation 之外输入,因为 Next.js 不维护其他可能的属性。

¥Good to know: sassOptions are not typed outside of implementation because Next.js does not maintain the other possible properties.