Easy integration between Rollup and cssnext.
npm install rollup-plugin-cssnext  
Easy integration between Rollup and postcss-preset-env.
``bash`
npm install --save-dev rollup-plugin-cssnext
First, configure Rollup:
`js
import cssnext from 'rollup-plugin-cssnext'
const rollupOptions = {
plugins: [
cssnext({
include: '*/.css',
exclude: null,
dynamic: true,
minify: true
})
]
}
`
Then, import a CSS file as a string:
`js
import style from './style.css'
console.log(style)
`
Minify CSS using cssnano. Default: false.
Return a template function instead of a string. Default: false.
The template function takes a single argument containing the replacements for
every var() in the CSS. For example, take the following CSS:
`css
:root {
--bgColor: brown;
}
body {
background-color: var(--bgColor);
color: var(--fgColor);
}
`
With { dynamic: true }, you'd use this stylesheet as follows:
`js
import buildCss from './style.css'
const styleSheet = buildCss({
fgColor: 'white'
})
console.log(styleSheet)
``
From rollup-pluginutils.
Options for postcss.
Options for postcss-preset-env.
MIT