Skip to content
This repository has been archived by the owner on Jun 15, 2022. It is now read-only.

Import .scss file from .jsx file #68

Open
lewischa opened this issue Jul 29, 2018 · 0 comments
Open

Import .scss file from .jsx file #68

lewischa opened this issue Jul 29, 2018 · 0 comments

Comments

@lewischa
Copy link

I'm coming from a traditional web app development environment where I use webpack pretty consistently. In using webpack, I and my team are able to import scss files directly using a combination of loaders (sass-loader, css-loader, and style-loader).

I'm just getting started with Electron and I'm trying to use React as the framework for the front end along with sass, but I can't seem to do something like this:

// Irrelevant imports

import './styles.scss';  // <--- This doesn't work

export default class Header extends React.Component {
    // React things
}

Is there a way to do this, or am I way off the mark for "best practice" when using stylesheets with React and Electron? I'm trying to avoid using webpack and equally trying to avoid having a bunch of different <link /> tags in html files.

Any help or direction would be greatly appreciated :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant