angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Unable to get bootstrap working with cli@webpack

Open fkolar opened this issue 10 years ago • 6 comments

Hi guys,

while Looking at the #630, I can not seems to find any similarities with the new @webpack version. I tried to include bootstrap. When I add node_modules/.../bootstrap/***/.sass file, it does not complain when you try to build the project it is just during a runtime it cannot find the styles.

Is there anything else which needs to be done ?

  1. I have to bootstrap installed under my npm package modules
  2. I included the scss files

Thanks so much for any guidence.

Frank

fkolar avatar Aug 31 '16 15:08 fkolar

this is my angular-cli.json

 "project": {
    "version": "1.0.0-beta.11-webpack.2",
    "name": "angular-xxx"
  },
  "apps": [
    {
      "main": "src/main.ts",
      "tsconfig": "src/tsconfig.json",
      "mobile": false,
      "styles": [
        "src/main.scss",
        "./node_modules/bootstrap/scss/bootstrap-flex.scss"
      ]
    }
  ],

I should not need to @import all the styles right? when I am not doing it inside my project. I guess webpack takes all the scss files and combine them togher ?

I would need this main.scss as well to define some global variables and even this one is not picked up.

fkolar avatar Aug 31 '16 15:08 fkolar

Is defaults.styleExt set to scss in angular-cli.json "defaults": { "styleExt": "scss", ... }

ankitSaroch avatar Aug 31 '16 17:08 ankitSaroch

@fkolar apps[0].styles added in 1.0.0-beta.11-webpack.3

wjke avatar Sep 01 '16 04:09 wjke

Where do I find the new webpack versions? I can only see webpack.2 on the tag-list?

Richard87 avatar Sep 03 '16 15:09 Richard87

@fkolar @Richard87 the latest version, beta.15 should allow you to import global css and js. See https://github.com/angular/angular-cli#global-library-installation for detailed instructions on how to use bootstrap.

filipesilva avatar Sep 20 '16 04:09 filipesilva

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.