egoist / rollup-plugin-postcss

Seamless integration between Rollup and PostCSS.
MIT License
677 stars 217 forks source link

unable to read global scss files #365

Open IslamGamal88 opened 3 years ago

IslamGamal88 commented 3 years ago

Hi there,

i'm trying to create a component library with sass for styling so i have src/scss/variables,mixins etc.

but when i run the build command i get this error message: (plugin postcss) Error: Undefined variable: "$shady-lady" and i have imported the main.scss file that has imports for all the partials at the top of my index.ts file

here's my config file

export default { input: "src/index.ts", output: [ { file: packageJson.main, format: "cjs", sourcemap: true, }, { file: packageJson.module, format: "esm", sourcemap: true, }, ], plugins: [ cleaner({ targets: ["./lib"], }), postcss({ plugins: [autoprefixer] }), peerDepsExternal(), resolve(), commonjs(), typescript({ exclude: ["**/*.stories.tsx", "**/*.test.tsx"], }), ], };

what am i missing?

jshrssll commented 2 years ago

@IslamGamal88 did you find a solution to this?