主题
sassOptions
sassOptions 允许你配置 Sass 编译器。
¥sassOptions allow you to configure the Sass compiler.
ts
import type { NextConfig } from 'next'
const sassOptions = {
additionalData: `
$var: red;
`,
}
const nextConfig: NextConfig = {
sassOptions: {
...sassOptions,
implementation: 'sass-embedded',
},
}
export default nextConfig需要了解:
sassOptions不在implementation之外输入,因为 Next.js 不维护其他可能的属性。¥Good to know:
sassOptionsare not typed outside ofimplementationbecause Next.js does not maintain the other possible properties.