rollup-plugin-postcss icon indicating copy to clipboard operation
rollup-plugin-postcss copied to clipboard

Cannot get postcss to work at all

Open chrisciampoli opened this issue 6 years ago • 3 comments

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()
  ]
}

chrisciampoli avatar Jun 11 '19 22:06 chrisciampoli

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

mario-jerkovic avatar Feb 09 '20 17:02 mario-jerkovic

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

reyman avatar Aug 02 '20 08:08 reyman

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.

wardpeet avatar Aug 24 '20 06:08 wardpeet