📜  nextjs 全局 scss 变量 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:08.404000             🧑  作者: Mango

代码示例1
const path = require('path')
//main.scss contains all variable and mixin imports, this line will prepend that main.scss
//to all module styles.. advisable to use scss partials for vars and mixins etc
    
    module.exports = {
        sassOptions: {
          includePaths: [path.join(__dirname, 'styles')],
          prependData: `@import "main.scss";`
        }
    }