0

I've started using Electron alongside React and one issue I'm facing right now - which may actually be unrelated to Electron - is that Node cannot seem to "find" a Sass module that I am importing despite the fact the styles I'm importing are actually working.

Here is my file structure:

src
|__Render
   |__Styles
   |  |__Page
   |     |__Home.module.scss
   |__App.tsx

Inside of App.tsx, I'm importing the Sass module like so:

import styles from "./Styles/Page/Home.module.scss";

export default function App(){
    return <div className={styles.test}>Test</div>
}

and receiving the error:

TS2307: Cannot find module './Styles/Page/Home.module.scss' or its corresponding type declarations.

Despite this, if I inspect the element I'm targeting, the styling is being applied.

<div class="Home_test__QTxtE">Test</div>

I have followed every single answer in this thread to no avail.

Is this an issue with Electron? Is there some sort of extra configuration I'm missing?

Also, it might be worth mentioning, that if I just import "Test.css";, this works fine.

GROVER.
  • 4,071
  • 2
  • 19
  • 66

0 Answers0