egoist/rollup-plugin-postcss

Keep "import css" line to the output file?

Open

#204 opened on Nov 15, 2019

View on GitHub
 (14 comments) (9 reactions) (0 assignees)JavaScript (209 forks)user submission
enhancementhelp wanted

Repository metrics

Stars
 (689 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Rollup Config

export default {
  input: "src/index.js",
  output: {
    file: "dist/index.js",
    format: "cjs"
  },
  plugins: [
    postcss({
      extract: true
    })
  ]
};

src/index.js

import "./index.less";

Expected bundle

require("./index.css") 
  • But the actual result is an empty bundle

Contributor guide