egoist / rollup-plugin-postcss

Seamless integration between Rollup and PostCSS.
MIT License
673 stars 215 forks source link

Cannot get postcss to work at all #174

Open chrisciampoli opened 5 years ago

chrisciampoli commented 5 years ago

I've tried to extract the css into a styles.css file, as well as without any options just trying to use the css.

import babel from 'rollup-plugin-babel'
import builtins from 'rollup-plugin-node-builtins';
import commonjs from 'rollup-plugin-commonjs'
import external from 'rollup-plugin-peer-deps-external'
import postcss from 'rollup-plugin-postcss'
import resolve from 'rollup-plugin-node-resolve'
import url from 'rollup-plugin-url'
import typescript from 'rollup-plugin-typescript'

import pkg from './package.json'

export default {
  input: 'src/index.js',
  output: [
    {
      file: pkg.main,
      format: 'cjs',
    },
    {
      file: pkg.module,
      format: 'es',
    }
  ],
  plugins: [
    builtins(),
    typescript(),
    external(),
    postcss({
      extract: {
        path: 'styles.css'
      },
      plugins: []
    }),
    url(),
    babel({
      exclude: 'node_modules/**',
      plugins: [ 'external-helpers' ]
    }),
    resolve(),
    commonjs()
  ]
}
mario-jerkovic commented 4 years ago

@chrisciampoli I have the same issue ... I think that the rollup-plugin-node-resolve introduces some issues

reyman commented 4 years ago

Any news on this, i had the same problem, i post an issue on stackoverflow ... https://stackoverflow.com/questions/63198127/packaging-web-component-made-with-lit-element-using-rollup-postcss-and-tailwind

wardpeet commented 4 years ago

Sorry to hear you're running into an issue. To help us best begin debugging the underlying cause, it is incredibly helpful if you're able to create a minimal reproduction. This is a simplified example of the issue that makes it clear and obvious what the issue is and how we can begin to debug it.

If you're up for it, we'd very much appreciate if you could provide a minimal reproduction and we'll be able to take another look.