I have a question about using bootstrap in KVision...
# kvision
t
I have a question about using bootstrap in KVision. We would like to process bootstrap and our SCSS files during the build instead of using CSS from kvision-bootstrap-css module. I removed the module but I still get bootstrap somehow included in the project. Do you have some example how to set it up?
Copy code
implementation(npm("sass", "1.32.4"))
        implementation(devNpm("sass-loader", "^7.1.0"))
        implementation(devNpm("css-loader", "^4.2.0"))
        implementation(devNpm("style-loader","^1.2.0"))
        implementation(devNpm("bootstrap","^4.6.0"))

        implementation("pl.treksoft:kvision:$kvisionVersion")
//        implementation("pl.treksoft:kvision-bootstrap:$kvisionVersion")
        implementation("pl.treksoft:kvision-bootstrap-datetime:$kvisionVersion")
        implementation("pl.treksoft:kvision-bootstrap-select:$kvisionVersion")
        implementation("pl.treksoft:kvision-bootstrap-spinner:$kvisionVersion")
        implementation("pl.treksoft:kvision-bootstrap-upload:$kvisionVersion")
        implementation("pl.treksoft:kvision-bootstrap-dialog:$kvisionVersion")
        implementation("pl.treksoft:kvision-bootstrap-typeahead:$kvisionVersion")
I am not sure about kvision-bootstrap module, should i remove it as well?
r
No, I don't think so. It only includes bootstrap js.
css module is separated just to be able to use your own version
how do you process bootstrap sass files?
t
I have
require("app.scss")
in app class and configured webpack sass-loader
r
I assume you don't intend to use your own version of bootstrap js files, because it's not supported. You would have to exclude whole kvision-bootstrap module.
t
I removed
kvision-bootstrap
module and styles disapeared.
r
just to be clear - you removed
kvision-bootstrap-css
module, didn't include any css yourself and yet you had bootstrap css included in the project?
I'm testing this configuration right now and I don't see bootstrap styles in my project.
overriding bootstrap sass variables works fine for me as well
so it absolutely should work
tested on 4.0.0 with both IR and legacy to be sure
let me know if you can share the project if it still doesn't work for you
t
I don't understand it, I seems, I still had
kvision-bootstrap-css
included/cached somehow. cleaned whole project and it works
🤦 1
🙂 1