Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@import not working in sass.node.js #126

Open
BananaAcid opened this issue Apr 28, 2020 · 0 comments
Open

@import not working in sass.node.js #126

BananaAcid opened this issue Apr 28, 2020 · 0 comments

Comments

@BananaAcid
Copy link

BananaAcid commented Apr 28, 2020

I am using windows and a main.scss importing a ./mixin/sub.scss

then:

import * as SassCompiler from './sasslib/sass.node.js';

SassCompiler(pathtoScss, { ... }, r => {
  if (r.status) { console.log(); process.exit(99); }
});

It tells me, it doesn't find my sub.scss - even thought, showing me the correct full path. I am trying to add this in a small company internal extension for VSCode.

Any additional step needed?

edit:

(without a hack like process.chdir( '.' + pathtoScss.replace(path.dirname(pathtoScss) )) ? This would be kinda problematic with other extensions. And the Editor.)

edit2:

there seems to be a solution (somehow not really understandable to me) at https://github.com/ritwickdey/vscode-live-sass-compiler/blob/3d2818d9053454affeab2e6fce4a7beb7c36cfb5/src/appModel.ts#L172

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant