question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

styleguide.config with .scss variables.scss

See original GitHub issue

How do I add a stylesheet(scss) to load along with my styleguide? I am using vue-cli-3

module.exports = {
  // set your styleguidist configuration here
  title: 'Default Style Guide',
  defaultExample: true,
  components: 'src/components/**/[A-Z]*.vue',
  webpackConfig: {
    module: {
      resolve: {
        extensions: ['.es6']
      },
      rules: [
        {
          css: {
            loaderOptions: {
              // pass options to sass-loader
              sass: {
                // @/ is an alias to src/
                // so this assumes you have a file named `src/variables.scss`
                data: `@import "@/variables.scss";`
              }
            }
          }
        }
      ]
    }
  }
}

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
elevatebartcommented, Sep 6, 2018

@raulmelo riding a white horse running to the rescue, my armor shining in the sun 😉 Let me check that.

0reactions
elevatebartcommented, Oct 16, 2018

Hello @raulmelo, I found out that with the vue cli 3, if you want to change the webpack config css, you have to use this doc passing-options-to-pre-processor-loaders

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sass Style Guide | CSS-Tricks
Sass Style Guide · Use Your Regular CSS Formatting Rules / Style Guide · List @extend(s) First · List @include(s) Next · List...
Read more >
Variables - Sass
Sass variables are all compiled away by Sass. · CSS variables can have different values for different elements, but Sass variables only have...
Read more >
SCSS style guide - GitLab Docs
This style guide recommends best practices for SCSS to make styles easy to read, easy to maintain, and performant for the end-user. Rules....
Read more >
Sass Tutorial on How to Write Better CSS Code - Toptal
Use variables. Start with the more general and global variables like colors, and create a separate file for them _colors.scss . If you...
Read more >
Sass Guidelines
Because of that, SCSS is the default syntax throughout these guidelines. ... A styleguide is not just a pleasing document to read, picturing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found