2016-01-29 9 views
5

Używam WebPACK załadować bootstrap-Sass za pomocą tej wtyczki bootstrap-loaderWebPACK bootstrap-ładowarka zwyczaj obciążenie plik po bootstrap

Próbowałem dodać moje niestandardowe .scss plik i co .bootstraprc i konfiguracji jak poniżej:

bootstrapVersion: 3 
styleLoaders: 
- style 
- css 
- sass 

appStyles: ./src/sass/main.scss 

styles: 

# Mixins 
mixins: true 

# Reset and dependencies 
normalize: true 
print: true 
glyphicons: true 

# Core CSS 
scaffolding: true 
type: true 
code: true 
grid: true 
tables: true 
forms: true 
buttons: true 

# Components 
component-animations: true 
dropdowns: true 
button-groups: true 
input-groups: true 
navs: true 
navbar: true 
breadcrumbs: true 
pagination: true 
pager: true 
labels: true 
badges: true 
jumbotron: true 
thumbnails: true 
alerts: true 
progress-bars: true 
media: true 
list-group: true 
panels: true 
wells: true 
responsive-embed: true 
close: true 

# Components w/ JavaScript 
modals: true 
tooltip: true 
popovers: true 
carousel: true 

# Utility classes 
utilities: true 
responsive-utilities: true 

### Bootstrap scripts 
scripts: 
    transition: true 
    alert: true 
    button: true 
    carousel: true 
    collapse: true 
    dropdown: true 
    modal: true 
    tooltip: true 
    popover: true 
    scrollspy: true 
    tab: true 
    affix: true 

Problem polega na tym, że podczas kompilacji pliku moje niestandardowe css jest ładowane przed plikiem bootstrap.

Moja main.scss:

@import '~animate.css/animate.min.css'; 

$color: blue; 

body{ 
    color:$color; 
} 

Jak sprawdzić ponownie body{} ma pojawić się po bootstrap. ale importuj plik przed bootstrapem.

Czy to ma wyglądać tak, czy też popełniam błąd?

Odpowiedz

0

Istnieje opcja w .bootstraprc, aby dodać dodatkowe style do ładowania początkowego.

# Import your custom styles here. You have access to all the bootstrap variables. If you require 
# your sass files separately, you will not have access to the bootstrap variables, mixins, clases, etc. 
# Usually this endpoint-file contains list of @imports of your application styles. 
appStyles: ./app/styles/app.scss 
Powiązane problemy