Skip to content

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

@BananaAcid

Description

@BananaAcid

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions