borodean / postcss-assets

An asset manager for PostCSS
MIT License
537 stars 32 forks source link

How to use this in rollup? #77

Closed sheltondong closed 6 years ago

sheltondong commented 6 years ago

How to use this plugin in rollup?

derrickb commented 6 years ago

Install the rollup postcss plugin and this plugin, then use it in your rollup config like so:

import postcss from 'rollup-plugin-postcss';
import assets from 'postcss-assets';

export default {
  plugins: [
    postcss({
      plugins: [assets({ /* options */ })]
    })
  ]
}