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

Buggy @import (v3.1.0) #112

Open
doasync opened this issue Feb 6, 2018 · 4 comments
Open

Buggy @import (v3.1.0) #112

doasync opened this issue Feb 6, 2018 · 4 comments

Comments

@doasync
Copy link

doasync commented Feb 6, 2018

Bugs:
Inline comments cannot be removed from imported files (the root file is ok)
Sass variables cannot be used when imported from the external file

Version:
precss 3.1.0

Temporary solution:
Add postcss-easy-import plugin before preCSS:

{
  loader: 'postcss-loader',
  options: {
    ident: 'postcss',
    parser: 'postcss-scss',
    plugins: [
      easyImport({ prefix: '_', extensions: ['.css', '.scss'] }),
      preCSS({ stage: 3 }),
    ],
  },
}
@doasync
Copy link
Author

doasync commented Feb 6, 2018

#111 and #110 are related

@doasync doasync changed the title Buggy @import Buggy @import (v3.1.0) Feb 6, 2018
@illiaskh
Copy link

illiaskh commented Feb 8, 2018

Thanks for the solution !

@ruyaoyao
Copy link

This issue remains in precss v4.0.0, and I just spent the morning fixing this issue but no luck.
God, I wish I had seen this earlier. Thanks @doasync

@maxmilton
Copy link

I've submitted a PR to fix this issue. Follow along at csstools/postcss-advanced-variables#71

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

4 participants