anteriovieira / nuxt-sass-resources-loader

SASS resources (e.g. variables, mixins etc.) module for NuxtJs
https://www.npmjs.com/package/nuxt-sass-resources-loader
185 stars 15 forks source link

Trouble getting it working #15

Closed erichodges closed 6 years ago

erichodges commented 6 years ago

Overview of the problem

Description

I want to have multiple sass files in /assets/scss and import them into /scss/main.scss. I've tried every configuration I could find for modules in nuxt.config.js. Here is the latest:

modules: [
    // provide path to the file with resources
    'nuxt-sass-resources-loader',
  ],
  sassResources: [
       '@/assets/scss/main.scss',
       '@/assets/scss/base.scss'

  ],

I'm getting an error that shows that variables in my base.scss file are not showing up in main.scss. I don't understand what I'm doing wrong.

my project is at: https://github.com/erichodges/nuxt-bulma-boilerplate

anteriovieira commented 6 years ago

Hi @erichodges , please try version v2.0.2

scottdotau commented 6 years ago

Hey @erichodges,

That file doesn't exist :) your actual file name for base.scss has an _ in it :)

You config here is wrong: '@/assets/scss/base.scss'

Should point to: '@/assets/scss/_base.scss'

Assuming you copied straight from the SCSS file when switching over :)

erichodges commented 6 years ago

Thanks Scott,

One of the things I tried was switching between using the underscore and not using it. The new version, 2.0.2 fixed the issue.

On Sat, Jul 21, 2018 at 7:00 PM, Scott Geary notifications@github.com wrote:

Hey @erichodges https://github.com/erichodges

You config here is wrong: '@/assets/scss/base.scss'

Should point to: '@/assets/scss/_base.scss'

Assuming you copied straight from the SCSS file when switching over :)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/anteriovieira/nuxt-sass-resources-loader/issues/15#issuecomment-406835566, or mute the thread https://github.com/notifications/unsubscribe-auth/AOSY0Qo6vP2e7eVcut4QqrKHHI_6wv5aks5uI9ykgaJpZM4UPb8G .