2

I have a scss file in which I do not want sass to process an @import statement as it will be processed by this postcss module https://github.com/postcss/postcss-import

How can I do this using gulp-sass?

Encore PTL
  • 8,084
  • 10
  • 43
  • 78
  • Sass does not process .css files at all. – cimmanon Nov 19 '14 at 22:57
  • I'm not sure I totally understand your question, but if you `@import` a `.css` file the `@import` statement will remain intact in the resulting `.css` file. You could then run other tasks on the resulting `.css` file. This is as opposed to calling `@import` on a `.scss` or `.sass` file which Sass will then attempt to compile. – rb- Nov 20 '14 at 03:17
  • Postcss requires it to be as such `@import "foo.css";` where as sass converts it to a `@import url(....css);` – Encore PTL Nov 20 '14 at 14:12

1 Answers1

0

You simply can't. Sass will compile @import “some.css” to @import url(....css);

Why don't you use Postcss (and neccessary plugins) to compile your .scss file and that way postcss-import can deal with the @import.

user1275105
  • 2,643
  • 5
  • 31
  • 45