Rayrun
← Back to Discord Forum

playwright-ct sass imports from node_modules

I'm starting with playwirght-ct with react components in a CRA application and wanted to add some base styles we use across the app, these styles are a sass file which also make sass imports to node_modules

//playwright/index.tsx
import '../src/index.scss';
// src/index.scss
@import '~bootstrap/scss/functions';
//... other imports

when running the test i get [vite:css] [sass] Can't find stylesheet to import. @import '~bootstrap/scss/functions';

any suggestion on how to include node_modules in the sass configuration?

This thread is trying to answer question "How to include node_modules in the sass configuration in a playwright-ct with react components in a CRA application?"

2 replies

playwright-ct sass imports from node_modules

nevermind, I just removed the tilde from the sass imports and everything is working 🙂

Related Discord Threads

TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email luc@ray.run.