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:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
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
Remove your "type=“text/scss” declaration