Webpack a ni
Webpack 3 hmanga i project-a Bootstrap telh dan zir rawh.
bootstrap chu Node.js module angin npm hmangin install rawh.
Bootstrap -a JavaScript chu i app entry point-ah he line hi dah la (a tlangpuiin index.js
emaw app.js
):
A nih loh leh, a tul angin plugins pakhat zel i import thei bawk :
Bootstrap hi jQuery leh Popper ah a innghat a , hengte hi hetiang hian an sawifiah a peerDependencies
, hei hian a awmzia chu i package.json
hman danah an pahnih hian add ngei ngei tur a ni tihna a npm install --save jquery popper.js
ni
Plugin pakhat zel import i thlang a nih chuan exports-loader pawh i install tur a ni tih hre reng ang che
Bootstrap thiltihtheihna zawng zawng hmang tangkai tur leh i mamawh ang zela siam tur chuan source files te chu i project bundling process ah hmang la.
A hmasa berin nangmah ngeiin siam la, chu chu hmang la, built-in custom variables te_custom.scss
chu override rawh . Tichuan, i main sass file hmangin i custom variable te chu import la, Bootstrap hmangin i rawn lut leh ang:
Bootstrap compile tur chuan loader mamawh te chu install leh hman ngei ngei tur a ni: sass-loader , postcss-loader with Autoprefixer . Setup tlem ber nen chuan i webpack config ah hian he rule emaw a ang chi emaw hi a tel tur a ni:
A dang pawhin Bootstrap-a ready-to-use css chu i project entry point-ah he line hi dah maiin i hmang thei bawk ang:
Chutiang a nih chuan i rule awmsa chu i hmang thei ang for css
without any special modifications to webpack config except you don't sass-loader
just i mamawh style-loader leh css-loader .