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

Nesting an import within @responsive #428

Closed
timkelty opened this issue Mar 14, 2018 · 1 comment
Closed

Nesting an import within @responsive #428

timkelty opened this issue Mar 14, 2018 · 1 comment

Comments

@timkelty
Copy link

timkelty commented Mar 14, 2018

What I want to do is something like this:

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

(I'm using https://github.com/TrySound/postcss-easy-import for inlining @import statements.

I end up with an error like:

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)

This may be more related to postcss-easy-import, so I'll post something over there as well.

I'm thinking the issue is related to this: https://github.com/postcss/postcss-import#root:

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

In this case we do NOT want it to be relative.

@timkelty
Copy link
Author

It looks like this is actually working, and is a problem with postcss-import path resoltion inside nested blocks.

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