Skip to content
This repository was archived by the owner on Sep 29, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants