no css file after update `simplebar-react` to v2.4.2
See original GitHub issueDescribe the bug I got an error when building my web app like this.
[vite-plugin-pwa:build] [vite]: Rollup failed to resolve import "simplebar-react/dist/simplebar.min.css" from "src/main.ts".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`
I check file [my_web_app_directory]/node_modules/simplebar-react/dist/simplebar.min.css
is missing after update simplebar-react
to v2.4.2
To Reproduce
- Install
simplebar-react
v2.4.2. - Add
import 'simplebar-react/dist/simplebar.min.css'
into your web app entry point. - See an error from
webpack
/vite
/ etc.
Expected behavior
File simplebar-react/dist/simplebar.min.css
is not missing and correctly imported into the web app.
Reproducible example
Additional context Add any other context about the problem here.
Your environment
Software | Version(s) |
---|---|
SimpleBar (react) | 2.4.2 |
Browser | any browser |
Operating System | Ubuntu 22.04.1 |
Issue Analytics
- State:
- Created a year ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
simplebar - npm
Start using simplebar in your project by running `npm i simplebar`. There are 163 other projects in the npm registry using simplebar.
Read more >Improving documentation for react-simplebar #383 - GitHub
I'm using "react-simplebar". This is a helpful well performing library, that rightly gains a lot of popularity in recent months.
Read more >simplebar/README.md - UNPKG
SimpleBar only does one thing: replace the browser's default scrollbars with a custom CSS-styled scrollbar without sacrificing performance. Unlike most other ...
Read more >Solving the React Error: Not Picking Up CSS Style | Pluralsight
In this guide, you will learn about the errors that can occur while importing a CSS file into your React file.
Read more >npm run production error : "unknown option no-progress"
Laravel Mix 6 removes a number of options from the CLI. You will need to update the scripts section of your package.json file...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Solved in simplebar-react@2.4.3
Hey, nothing has changed since the last version, it’s the README that is pointing to the wrong CSS file. As a workaround you can do
import 'simplebar/dist/simplebar.min.css'
for now. I will send a patch for this asap.