-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to include bootstrap styles (bootstrap.min.css) #1220
Comments
Thank you @diegochavez! I already know about this solution. I was just asking myself if there is a way to only include the "bootstrap.min.css" because I just use bootstrap grid structure and other css classes. I don`t really need bootstrap.min.js or even jQuery, which increase the size of my application. |
Today I gave it another try and firts re-installed the css-loader with npm install css-loader --save-dev In my main.browser.ts I required my bootstrap.min.css I also changed the rule for css files to { Don't know what exactly did the trick but for me it's okay at this point. |
to use bootstrap and learn how to create new component |
Hey,
I'm currently struggling when I try to migrate my project into your webpack-starter. Most things work okay but I need bootstrap classes from bootstrap.min.css.
Currently I`ve got the following in my webpack.common.js:
module: {
rules: [
{
test: /.(woff2?|ttf|eot|svg)$/,
use: 'file-loader'
},
{
test: /.css$/,
use: ['to-string-loader', 'css-loader']
}
]
}
In my main.browser.ts I currently have:
import './assets/css/bootstrap/css/bootstrap.min.css';
import './assets/css/styles.css';
but I'm not sure if I have to do a require here instead but both doesn't work for me. I get no error message but the bootstrap grid system is not available when I run localhost:3000.
Any help would be very appreciated.
The text was updated successfully, but these errors were encountered: