加载中...

给nuxt3基础scss模块

安装依赖

yarn add -D sass 

配置

如果你有公共的scss文件,则需要在nuxt的配置文件中添加scss:

// nuxt.config.ts
export default defineNuxtConfig({
  // more  
  css: [
    // SCSS file in the project
    "~/assets/style/main.scss", // you should add main.scss somewhere in your app
  ],
})
posted @ 2024-01-14 22:00  水车  阅读(236)  评论(0编辑  收藏  举报