1
votes

I want the capability to overwrite react-bootstrap (Sass) in a Next.js app. I have this working fine in React apps, but I've been unsuccessful getting it to work in Next.js. I don't want it set globally, set in _app.js, because I need it at the component level. Ideally, I'd like do something like this inside the somename.module.scss file:

@import '~bootstrap/scss/bootstrap';

And then below that, define my classnames to extend bootstrap classes, like this:

.goright {
    @extend .text-right;
}

And if this isn't possible, is there another approach to achieve the same outcome with the Next framework?

1

1 Answers

0
votes

As I learned more about the purpose of css modules, I realized that I was going about this all wrong. Next supports CSS-in-JS (styled-jsx), which provides most of the kind of customization I need to do.