preboot / angular-webpack

A complete, yet simple, starter for Angular v2+ using webpack
MIT License
1.29k stars 557 forks source link

Installing bootstrap 4 #175

Closed nvitas closed 8 years ago

nvitas commented 8 years ago

I've read the previous bootstrap issues here but I'm still having an issue getting it to load.

Following the readme I have done 'npm install bootstrap@next --save'

and added to vendor.ts:

import 'bootstrap/dist/css/bootstrap.css';

However only partial styles are being applied and when I inspect the element (alert element in this case) in the browser I see that the styles on the element are being pulled from:

webpack:///./node_modules/bootstrap/scss/_alert.scss

and not (as specified in the vendor.ts):

node_modules/bootstrap/dist/css/bootstrap.css

Am I missing a step somewhere?

mattdistefano commented 8 years ago

webpack:///./node_modules/bootstrap/scss/_alert.scss sounds like maybe what you're seeing in the inspector is actually a sourcemapped file?

nvitas commented 8 years ago

my vendor.ts file points to: node_modules/bootstrap/dist/css/bootstrap.css the source map in that file points to /# sourceMappingURL=bootstrap.css.map / which has a 'sources' property that point to sass files["../../scss/bootstrap.scss","../../scss/_normalize.scss"...]

I'm not sure where to go from here though... it is picking up a part of the bootstrap style because i can see it in the inspector but it seems like it isn't resolving the sass part

tb commented 8 years ago

Try importing bootstrap styles from some .scss file like described in https://github.com/preboot/angular2-webpack/issues/99#issuecomment-219687478

nvitas commented 8 years ago

I started from scratch in the end because things just weren't making sense and once i nuked the project and got it up and running again the instructions in the readme worked as described.

Sorry for the noise, I must have done something wrong w/the previous setup...working fine now.