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.

[5.x] CSS cannot be loaded from `file:` URLs unless they end in a `.css` file extension with Electron >= 3.0

See original GitHub issue

Updating to the latest version of Electron (3.0.5) seems to break electron-forge.

Styles are no longer loaded and the dev tools console displays this warning: [Deprecation] CSS cannot be loaded from file:URLs unless they end in a.css file extension.

Obviusly this is because the <head> of my app contains <link rel="stylesheet" href="path/to/styles.scss">

How do I overcome this and still use electron-forge?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:4
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
randoniacommented, Dec 14, 2018

I found a cleaner workaround. Still isn’t ideal unfortunately, but on Windows (dev w/only one terminal) it makes it cake. I don’t know the progress on this bug though.

Using the package npm-run-all you can make it fairly easy to compile CSS at runtime with only one window.

$ npm i --save-dev node-sass npm-run-all
"dev:sass": "node-sass -w --include-path src/scss src/scss/main.scss src/styles/main.css",
"dev:start": "electron-forge start",
"start": "npm-run-all --parallel dev:*"
0reactions
MarshallOfSoundcommented, May 23, 2019

In anticipation of The V6 Stable Release we are closing out all the v5 issues. Once V6 stable is released it will be the only supported version of Electron Forge.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[5.x] CSS cannot be loaded from file: URLs unless they end in ...
Updating to the latest version of Electron (3.0.5) seems to break electron-forge. Styles are no longer loaded and the dev tools console displays ......
Read more >
CSS cannot be loaded from `file:` URLs unless they end in a ...
[Deprecation] CSS cannot be loaded from `file:` URLs unless they end in a `.css` file extension. i'm using chrome. css · sass ·...
Read more >
A brand new website interface for an even better experience!
[5.x] CSS cannot be loaded from `file:` URLs unless they end in a `.css` file extension with Electron >= 3.0.
Read more >
@lanethegreat/electron-compile - npm package | Snyk
Electron supporting package to compile JS and CSS in Electron ... "[Deprecation] CSS cannot be loaded from `file:` URLs unless they end in...
Read more >
Changelog | Meteor API Docs
Runs PostCSS plugins if the app has a PostCSS config and the postcss-load-config npm package installed. Supports TailwindCSS 3.x PR 1 PR 2....
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