csstools / precss

Use Sass-like markup in your CSS
https://jonathantneal.github.io/precss/
Creative Commons Zero v1.0 Universal
1.61k stars 77 forks source link

Buggy @import (v3.1.0) #112

Open doasync opened 6 years ago

doasync commented 6 years ago

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 commented 6 years ago

111 and #110 are related

illiaskh commented 6 years ago

Thanks for the solution !

ruyaoyao commented 5 years ago

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 commented 5 years ago

I've submitted a PR to fix this issue. Follow along at https://github.com/jonathantneal/postcss-advanced-variables/pull/71