Skip to content

Bootstrap 3 and glyphicons (fonts) #642

Description

@alvipeo

I finally found the setup that works with Bootstrap (I had problems with tests when using Bootstrap 4 alpha). So now I use Bootstrap 3 and almost everything works - the app and the tests.

The only issue I have now with glyphicons and bootstrap fonts. For example, when I use

<span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>

the icon is not loaded and here's what I get in the console:

browser_adapter.js:170 GET http://192.168.1.2:3000/node_modules/bootstrap/fonts/glyphicons-halflings-regular.woff2 - 404

Obviously, nothing like 'node_modules/...' exists so how do I set it up with webpack?

Currently, I use .less and these loaders:

 {test: /\.less$/, loader: 'raw-loader!less-loader'},
      {test: /\.(png|jpg|gif)$/, loader: 'file-loader'},
      //{ test: /\.(png|woff|woff2|eot|ttf|svg)$/, loader: 'url-loader?limit=100000' }
      {
        test: /\.woff(\?v=\d+\.\d+\.\d+)?$/,
        loader: "url?limit=10000&minetype=application/font-woff"
      }, {
        test: /\.woff2(\?v=\d+\.\d+\.\d+)?$/,
        loader: "url?limit=10000&minetype=application/font-woff"
      }, {
        test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/,
        loader: "url?limit=10000&minetype=application/octet-stream"
      }, {
        test: /\.eot(\?v=\d+\.\d+\.\d+)?$/,
        loader: "file"
      }, {
        test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
        loader: "url?limit=10000&minetype=image/svg+xml"
      }

Please help with this one. That's the only issue (for now) that stops me from using term 'an ideal web app setup for Angular 2' :)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions