2017-10-11 21 views
1

我正在努力升級到最新版本的reactstrap & bootstrap,我曾經有:reactstrap在我的package.json和bootstrap SCSS下載到我的client/src/styles/bootstrap目錄中。如何在容器特定的scss中包含bootstrap?

我現在已經在我的package.json:

"reactstrap": "^5.0.0-alpha.3", 
"bootstrap": "^4.0.0-beta", 

對於我的容器&組件特定SCSS文件,這個曾經工作:

home.jsx:

import '../styles/home/Home.css' 

home.scss

@import "../bootstrap/variables"; 
@import "../bootstrap/custom"; 
@import "../bootstrap/mixins/breakpoints"; 

@include media-breakpoint-down(sm) { 
    ... 
} 

這些@import文件不再可用於新的reactstrap和bootstrap。如何導入像@import "../bootstrap/mixins/breakpoints";這樣的引導項目?還是我這樣做全錯了?

感謝

回答

0

你需要從node_modules目錄引導模塊導入文件。所以你的根目錄的路徑是node_modules/bootstrap/scss/mixins/breakpoints

相關問題