Linking to css files from react index Linking to css files from react index reactjs reactjs

Linking to css files from react index


If you want to include css in your html, you gotta put them in your public folder and use '%PUBLIC_URL%' as the path to your css. So it would look something like this:

<link href="%PUBLIC_URL%/bootstrap.min.css" rel="stylesheet" />

Alternatively, it is highly recommended that you do import the css that you want inside your react component, because your css would get minified and bundled. So you could do something like:

import React, { Component } from 'react';// ... rest of importsimport './path/to/css/font-awesome.min.css'

For more info on this, go to the documentation here.