Skip to content

package-importer doesn't find packages from other packages #232

@dietergeerts

Description

@dietergeerts

My node modules don't get installed in a flat tree, but as an actual dependency tree where only the ones that are specified are installed, which is very good (I use pnpm) So the package structure I have is:

- my-package
|- node_modules
  |- my-toolkit
    |- node_modules
      |- bootstrap

Because of this, the importer can't find the bootstrap imports declared in the toolkit scss files, as it always starts searching from the cwd and not from the file that is asking for the import, which is a node_modules deeper. The importer should check which file loaded it (https://sass-lang.com/documentation/js-api#importer) and based on that set the starting directory to search in.

(another issue I encounter is that index.scss isn't resolved if you only state the directory, which does work normally with sass and sass-loader)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions