csstools/precss

Buggy @import (v3.1.0)

Opened this issue · 4 comments

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 }),
    ],
  },
}

#111 and #110 are related

Thanks for the solution !

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

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