TrySound / postcss-easy-import

PostCSS plugin to inline @import rules content with extra features
MIT License
201 stars 25 forks source link

Expected behavior, or not? #8

Closed jamesplease closed 8 years ago

jamesplease commented 8 years ago

If I use this plugin like so:

.pipe($.postcss([
    precss({import: {prefix: ''}}),
    easyImport({extensions: ['.sss']})
  ], {parser: sugarss}))

should I expect

@import 'my-file' to resolve to my-file.sss? It's only working if I do @import 'my-file.sss'. If I omit the extension, I get this error:

Message:
    ENOENT: no such file or directory, open '/Users/jmeas/WebDev/moolah/client-src/css/my-file.css'
Details:
    errno: -2
    code: ENOENT
    syscall: open
    path: /Users/jmeas/WebDev/moolah/client-src/css/my-file.css
    fileName: /Users/jmeas/WebDev/moolah/client-src/css/index.sss
Stack:
Error: ENOENT: no such file or directory, open '/Users/jmeas/WebDev/moolah/client-src/css/my-file.css'
    at Error (native)

If I turn off this plugin, PostCSS works exactly the same. Am I misconfiguring this, or something? 😕

jamesplease commented 8 years ago

Rearranging the order of the pluginz fixed it