TrySound / postcss-easy-import

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

Cannot get glob modules to work #15

Closed nwmcsween closed 7 years ago

nwmcsween commented 7 years ago

A very simple testcase is @import asm.css/lib/align-self/*.css; where asm.css is a node_module, it seems easy import isn't resolving it for some reason?

Relevant files

postcss.config.js (using postcss-cli)

module.exports = (ctx) => ({
  'no-map': true,
  plugins: {
    'postcss-easy-import': {},
    'postcss-reporter': {}
  }
})

building: ./node_modules/.bin/postcss $file -o $ofile where $file is @import "asm.css/lib/align-self/*.css"; of which asm.css/lib/align-self/* exists and has files in node_modules

TrySound commented 7 years ago

@simonsmith Can glob resolver look in node_modules?

simonsmith commented 7 years ago

Currently the glob functionality only works when resolving relative pathnames. I'm sure we could just combine the two as a new feature.

TrySound commented 7 years ago

There's glob-parent package which can help with this.