Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add css to index.html #273

Closed
abdulhaq-e opened this issue Jan 29, 2016 · 3 comments
Closed

How to add css to index.html #273

abdulhaq-e opened this issue Jan 29, 2016 · 3 comments

Comments

@abdulhaq-e
Copy link
Contributor

How should one utilise the following code found in index.html

  {% for (var css in o.htmlWebpackPlugin.files.css) { %}
  <link href="{%=o.htmlWebpackPlugin.files.css[css] %}" rel="stylesheet">
  {% } %}

I want to do that in order to include semantic.min.css. Please do suggest if there is a better way to it.

@manavsehgal
Copy link

Including UI frameworks like Semantic UI is not as straightforward because you need to take care of UI components that require JS and include these appropriately as Webpack modules.

Possible solutions... I will write a Wiki once I have something to demo.

  1. You may want to checkout Wiki written for including Bootstrap 4 for ideas.
  2. You may want to use CSS only version of semantic UI and include it straight within the index.html
  3. Use Sass Loader with Semantic UI Scss version to include specific components as required. Like so. The AngularPages demo has app level Scss theme, and component level Sass styling integration.

Consolidating UI related issues in #199.

@ghillert
Copy link

You may also want to checkout: https://github.com/ghillert/angular2-webpack-starter-bootstrap

I customized the starter slightly to add Bootstrap 3 (with JQuery) and Less support.

@yannvr
Copy link

yannvr commented Feb 18, 2016

I have added CSS support (the webpack way) in a PR #338.
As long as you include your CSS using require in your components / directives. They will all be picked and minified automatically in your index.html.

@ebeal ebeal closed this as completed May 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants