Skip to content

sass.node.js fails to import files in Windows #86

@rtruong

Description

@rtruong

When using sass.node.js, it fails to import files in Windows. Patching importerCallback() as follows fixes the issue:

function importerCallback(request, done) {
  // sass.js works in the "/sass/" directory, make that relative to CWD
  var requestedPath = path.normalize(
    path.join(
      path.dirname(request.previous.replace(/^\/sass\//, '')),
      request.current
    )
  ).replace(/\\/g, '/');
  importFileToSass(requestedPath, done);
}

Using 0.10.5.

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