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.

SCSS only works when a file is changed

See original GitHub issue
  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Please describe your issue: I try to use SCSS for my electron-forge project. I have included the SCSS file like this:

<link rel="stylesheet" type="text/scss" href="style.scss" />

(I could not find any documentation on this, but saw some examples from other people)

When I start the app no CSS is applied, I get a console warning that says:

Resource interpreted as Stylesheet but transferred with MIME type text/plain

If I modify my SCSS and refresh the window, the CSS is working. But only until I refresh or restart the application again.

There is no output in the terminal apart from HMR sent to all windows!.

Console output when you run electron-forge with the environment variable DEBUG=electron-forge:*. (Instructions on how to do so here). Please include the stack trace if one exists.

HMR sent to all windows!

What command line arguments are you passing?

DEBUG=electron-forge:* electron-forge start

What does your config.forge data in package.json look like?

"config": {
        "forge": {
            "make_targets": {
                "win32": [
                    "squirrel"
                ],
                "darwin": [
                    "zip"
                ],
                "linux": [
                    "deb",
                    "rpm"
                ]
            },
            "electronPackagerConfig": {},
            "electronWinstallerConfig": {
                "name": "patternlab_desktop"
            },
            "electronInstallerDebian": {},
            "electronInstallerRedhat": {},
            "github_repository": {
                "owner": "",
                "name": ""
            },
            "windowsStoreConfig": {
                "packageName": "",
                "name": "patternlabdesktop"
            }
        }
    },

Please provide either a failing minimal testcase (with a link to the code) or detailed steps to reproduce your problem. Using electron-forge init is a good starting point, if that is not the source of your problem.

I haven’t changed any config, I only started out with the React template, and a SCSS file inside src. Then I just start the project with electron-forge start.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
MarshallOfSoundcommented, Jul 21, 2017

This issue appears to be the parials issue with electron-compile.

Follow https://github.com/electron/electron-compile/issues/162 for progress on this issue

1reaction
MarshallOfSoundcommented, Jun 7, 2017

Remove your "type=“text/scss” declaration

Read more comments on GitHub >

github_iconTop Results From Across the Web

SCSS only works when a file is changed · Issue #245 - GitHub
If I modify my SCSS and refresh the window, the CSS is working. But only until I refresh or restart the application again....
Read more >
Changes not occur unless main.scss is saved | SASS
I have main.scss file that imports all ...
Read more >
SCSS changes are not getting compiled except in 1 file - Help
I am using live reload, and can verify it's working as it relates to changes to my JavaScript, HTML, Liquid, and 1 SCSS...
Read more >
Changes in files.scss not working - Sharetribe
Hello all, i'm making some changes on _home.scss and once i upload the file and restart nginx nothing changes... Do you have an...
Read more >
CSS file not updating on external changes (SASS)
I update my SASS file, the file watcher kicks in, and when I hit refresh on my browser, the page is updated.
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