css-modules / css-modulesify

A browserify plugin to load CSS Modules
MIT License
403 stars 47 forks source link

Access to result of postcss #119

Open ghost opened 6 years ago

ghost commented 6 years ago

is there possibility to access to result of postcss plugins?

I'm using postcss-import plugin and need to watch(watchify) every file imported by @import call in css.

Example below, but with css-modulesify don't know how to do it.

   Postcss().use(p).process(data).then((result) => {
      for ( const msg of result.messages ) {
        if ( msg.type != "dependency" ) continue;
        b.emit("file", msg.file); //watchify
      }
    });