Skip to content

Nested @import rules and relative module resolution #24

Description

@timkelty

See tailwindlabs/tailwindcss#428

I'm trying to do this:

@responsive {
  @import 'suitcss-components-grid';
}

However, when it tries to resolve, it always looks locally:

ERROR in ./node_modules/css-loader??ref--2-1!./node_modules/postcss-loader/lib??ref--2-2!./src/css/index.scss
Module not found: Error: Can't resolve './suitcss-components-grid' in '/Users/timkelty/Sites/dlr-craft3/src/css'
resolve './suitcss-components-grid' in '/Users/timkelty/Sites/dlr-craft3/src/css'
  using description file: /Users/timkelty/Sites/dlr-craft3/package.json (relative path: ./src/css)

I'm thinking this is because of this behavior from postcss-import:

Note: nested @import will additionally benefit of the relative dirname of imported files.

Any ideas?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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