Questions tagged [rollup-plugin-postcss]
30 questions
1
vote
0 answers
Rollup: inject "import index.css" into the index.ts file
I have a project that I want to create an NPM package from it.
My stack is: React, Typescript, less, and AntD.
When I'm creating a bundle with rollup.js, everything workes fine, but, the import CSS isn't injected to the top of the index.ts that I'm…

YonaMe
- 37
- 1
1
vote
0 answers
rollup Error: Unexpected token (Note that you need plugins to import files that are not JavaScript)
The rollup was working normally before the last update, now I don't know what the problem is, rollup-blugin-postcss is not working anymore.
This is the content of my rollup.config.js file:
import postcss from 'rollup-plugin-postcss'
export…

Mohamed Frindi
- 11
- 1
- 4
1
vote
0 answers
Rollup: How to add Fonts as a part of Library Build
I'm creating a Javascript UI Library where I want to use Roboto Font as a part of Library. I have used "rollup-plugin-url" but it is not working.

Harshal Lekurwale
- 51
- 7
0
votes
1 answer
Unable to get css module and execute application using rollup.js and react
Hi I am trying to create a react plugin using rollup which will be used locally instead of publishing to npm . I was able to create the plugin but the problem is i unable to generate the css (Which are in modules example somefile.module.css)…

Madpop
- 729
- 4
- 24
- 61
0
votes
1 answer
Rollup.js postcss plugin generates different sourcemap depending on its setting
I am using the rollup-plugin-postcss to compile multiple .scss files(partials) .
The problem is that depending on whether the sourceMap setting is 'inline' or true, the result of the output file will be different.
My folder structure is simple like…

norixxx
- 2,549
- 2
- 19
- 26
0
votes
0 answers
The npm package that I published with rollup does not load the CSS global variables
I am creating an npm package that includes my custom components, using Create-react-app, Storybook, and Styled-components.
My project structure
index.css:
:root {
/* colors variable */
--primary-color: #6750A4;
--primary-container-color:…

Pourya Ataee
- 1
- 4
0
votes
0 answers
How to limit a css file to scope in a react component library?
I created a component Lib to use in other projects with Reac and Rollup and I'm facing some issues to properly style it.
My package.json
{
"name": "react-component-lib",
"version": "0.0.1",
"description": "A react component library",
…

YEDK
- 23
- 1
- 4
0
votes
0 answers
React libray created with rollup not working css with srr or nextjs?
I create a simple react packages for personal uses (private package). But when I want to use it into nextjs project it's css not working with ssr. Actually, working but not ssr friendly. Here after component loading then css will be loaded. But I…

Simon Santana
- 19
- 5
0
votes
0 answers
React npm packages using rollup not working with srr or nextjs?
I create a simple react packages for personal uses (private package). But when I want to use it into nextjs project it's css not working with ssr. Actually, working but not ssr friendly. Here after component loading then css will be loaded. But I…

Siam Ahnaf
- 402
- 4
- 14
0
votes
0 answers
Postcss snowpack plugin default path
I'm working on a project with snowpack to bundle my typescript and tailwindcss files. By default Postcss looks for the tailwinds main.css file with
@tailwind base;
@tailwind components;
@tailwind utilities;
//Other styles
In the root of the…

Dhaivath Lal
- 42
- 7
0
votes
0 answers
how to use rollup-plugin-postcss multiple times with rollup?
I have two app projects which use rem for responsive design, but they have different rem unit, one is for vw, the other is for vw. They all have an dependency package that contains business component and style. So I want to bundle the business…

Ron Smith
- 197
- 3
- 17
0
votes
0 answers
How do you update the source map in a Rollup plugin transform hook?
I have a Rollup plugin (via Vite) to extract some CSS rules into a separate stylesheet (originally LESS, but CSS by this time in the build). I'm having some issues with the source maps. Only the extracted sheet has a source map included. The…

Erin
- 5,315
- 2
- 20
- 36
0
votes
1 answer
Using Rollup to process Sass as well as CSS Modules
we are using rollup to make the build. We've currently only had Sass, but are trying to also use css modules for some custom components. The configuration in the rollup.config.js is
postcss({
extract: false,
modules: true
}),
scss({
…

Mickey Puri
- 835
- 9
- 18
0
votes
0 answers
Problems with bundling bootstrap in rollup
I am trying to bundle my stylesheets which should use bootstrap v5. I can bundle my CSS files without a problem but I cannot get bootstrap to work. The bundler runs through, but bootstrap styles are not included.
What I did:
I installed bootstrap…

shadow
- 151
- 2
- 12
-1
votes
1 answer
What is the right way to ship css in a react library?
I am developing my own library of react components. I am using rollup to create the build. I also want to ship css along with it which i bundled into a single styles.css file. My concern is how a user would use it. They can simply import the…

Andrew Slock
- 21
- 3