react-component-lib icon indicating copy to clipboard operation
react-component-lib copied to clipboard

Can't add css files to reactComponentLib directory

Open kadol92 opened this issue 5 years ago • 0 comments

Hello @michal-wrzosek, I'm trying to add css file(s) instead od styled components to reactComponentLib .

import typescript from "rollup-plugin-typescript2";
import pkg from "./package.json";
import postcss from 'rollup-plugin-postcss';

export default [
    {
        input: "src/index.ts",
        external: Object.keys(pkg.peerDependencies || {}),
        plugins: [
            typescript({
                typescript: require("typescript")
            }),
            postcss({
                extensions: ['.css'],
            }),
        ],
        output: [
            { file: pkg.main, format: "cjs" },
            { file: pkg.module, format: "esm" },
            {
                file: "example/src/reactComponentLib/index.js",
                format: "es",
                banner: "/* eslint-disable */"
            }
        ]
    }
];

This configuration works only for dist folder. What should be change to achieve result that I want?

kadol92 avatar Dec 13 '19 12:12 kadol92