Closed mmattocks closed 3 years ago
I'm facing this.
Since v5.0.2 the logic added by @be5invis for copying the file is working, but then looks like the editor can load the file properly:
Look how both files exist but the network call can't be resolved – I'm under macOS.
I'm not sure how practical could be this, but instead of injecting the script on the HTML markup:
https://github.com/be5invis/vscode-custom-css/blob/master/src/extension.js#L179
I did a workaround to inject all the file content:
return `<style>${fetched.toString()}</style>\n`
and now it's working since the error is happening when the browser try to load the external content
I just pushed a patch version to make the logic of deciding the staging directory more reliable. And it also made it configurable: configuration vscode_custom_css.staging_dir
will override the built-in value.
God protect and preserve you, I have -3 to coding morale checks without this extension. I ended up using the override variable, which worked fine, but, for anyone who also needs this, it shouldn't be set to the extensions/ directory itself, or the root permissioned instance will wipe out the .css and extensions, and give extensions/ root permissions. Thanks very much for the fix!!!
Hello! Since the v5. change, I have not been able to reload custom CSS as usual. Normally I run
sudo code --user-data-dir="/home/main/.config/Code/"
, run "reload custom css", and restart with permissions using the popup gui. When I do this since v5., the css file is applied correctly in the sudo instance, but when started normally, the Log (Main) reads:'/root/.vscode' doesn't exist.