Skip to content

Sass preprocessor and CSS modules not working #65

@tiagoporto

Description

@tiagoporto

Hi @fwouts, thanks to refer to this library in fwouts/react-screenshot-test#34.

The styles from my component is not being used. My guess is that SASS and CSS modules is being ignored.

Is there some example to configure that?

I'm reading the documentation for vite and seems that CSS module and SASS is already supported.

https://vitejs.dev/guide/features.html#css-modules

I tryed

// viteshot.config.js
const playwrightShooter = require('viteshot/shooters/playwright')
const playwright = require('playwright')
const vite = require('vite')

module.exports = {
  framework: {
    type: 'react',
  },
  shooter: playwrightShooter(playwright.chromium),
  filePathPattern: '**/*.screenshot.@(js|jsx|tsx|vue|svelte)',
  vite: vite.UserConfig,
}

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions