question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

no css file after update `simplebar-react` to v2.4.2

See original GitHub issue

Describe 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

  1. Install simplebar-react v2.4.2.
  2. Add import 'simplebar-react/dist/simplebar.min.css' into your web app entry point.
  3. 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:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Grsmtocommented, Sep 28, 2022
0reactions
Grsmtocommented, Sep 28, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found