zoukankan      html  css  js  c++  java
  • 如何把bootstrap用webpack打包

    今天下载了一个anguarl2写后台,一直没有找到是如何使用bootstrap样式的,然后就全文做了搜索,发现有一段代码

    import 'bootstrap-loader';

    这段代码很可疑,所以就查了一下,发现确实是bootstrap-loader将bootstrap引入的。

    # 第1步安装bootstrap-loader
    
    npm install bootstrap-loader --save
    
    # 第2步 如果你使用的是Bootstrap3
    
    npm install bootstrap-sass --save
    
    #如果你使用的是Bootstrap4
    npm install bootstrap@v4.0.0-alpha.2 --save
    
    # 我发现npm下载不了bootstrap4,所以我是从网上下载下来的,然后放到
    # node_modules下的,下载地址http://v4.bootcss.com/getting-started/download/
    
    
    # 第四步 安装其他样式处理loader
    
    npm install css-loader node-sass resolve-url-loader sass-loader style-loader url-loader --save
    
    # 如果你使用的是Bootstrap 4,可能会需要
    
    npm install postcss-loader --save
    
    # 我的提示没有 flie-loader,所以我安装了  flie-loader
    
    npm install  flie-loader --save

    以下是相关资料

    https://www.npmjs.com/package/bootstrap-loader

    https://github.com/shakacode/bootstrap-loader

    https://github.com/shakacode/bootstrap-loader/blob/master/examples/basic/package.json

  • 相关阅读:
    apollo使用场景2
    我问问
    洛谷 P3979 遥远的国度
    小技巧—对拍和输出文件的比较
    洛谷 P6850 NOI
    小技巧—双向边快速枚举
    ZJOI 2008 骑士
    小技巧—指数形式的枚举
    小技巧—滚动数组
    刷题心得—背包问题的枚举方式
  • 原文地址:https://www.cnblogs.com/liuyt/p/5708508.html
Copyright © 2011-2022 走看看