electron-userland / electron-compile

DEPRECATED: Electron supporting package to compile JS and CSS in Electron applications
1.01k stars 99 forks source link

Node Module scss file fails to compile if it uses import as well #277

Open ErraticFox opened 6 years ago

ErraticFox commented 6 years ago

If I import a Node Module like so @import "node_modules/@material/theme/mdc-theme";, this works. Though if mdc-theme has an import within the file itself, it fails to compile. How can I fix this? It looks like it's looking in the root directory for it because it's ./mixins. So if I'm working with a node module, how could I fix this and keep the directory the same?

Error:

Failed to compile C:/Users/errat/Desktop/mango/css/stylesheet.scss: Error: File to import not found or unreadable: ./mixins.
       Parent style sheet: /sass/C:\Users\errat\Desktop\mango\node_modules\@material\theme\mdc-theme.scss
        on line 17 of sass/C:\Users\errat\Desktop\mango\node_modules\@material\theme\mdc-theme.scss
>> @import "./mixins";
bradharms commented 6 years ago

I seem to be getting the same behavior but not the error message.

EDIT: I found it in the network tab of the developer console.

grofit commented 6 years ago

I seem to be getting this as well, including a framework with a sass file which includes other sass files.