How to include bootstrap css and js in reactjs app

0 votes

I want to incorporate bootstrap into my ReactJS app because I'm new to it.

Npm install bootstrap —save is how I installed Bootstrap.

In my React app, I now want to load the bootstrap CSS and JS.

I employ Webpack.

webpack.config.js

var config = {
    entry: './src/index',

    output: {
        path: './',
        filename: 'index.js'
    },

    devServer: {
        inline: true,
        port: 8080,
        historyApiFallback: true,
        contentBase:'./src'
    },

    module: {
        loaders: [
            {
                test: /\.js?$/,
                exclude: /node_modules/,
                loader: 'babel',

                query: {
                    presets: ['es2015', 'react']
               }
            }
        ]
    }
};

module. exports = config;

How do I include bootstrap CSS and JS in a ReactJS app from node modules? is my problem. How can I configure bootstrap such that it is included in my React app?

Jun 30 in CSS by Edureka
• 9,940 points
28 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In CSS

0 votes
1 answer

How to create material design input form using css and bootstrap?

Try with this code. HTML: <div class="main_div"> ...READ MORE

answered Jun 21 in CSS by Edureka
• 9,540 points
108 views
0 votes
1 answer

How to convert a web page(html,css,js) into android app?

I used Phonegap a lot for this, ...READ MORE

answered Jun 28 in CSS by Edureka
• 9,540 points
47 views
0 votes
1 answer

How to set Bullet colors in UL/LI html lists via CSS without using any images or span tags

I use jQuery for this: jQuery('li').wrapInner('<span class="li_content" />'); & ...READ MORE

answered May 27 in CSS by Edureka
• 9,540 points
46 views
0 votes
1 answer

How to insert spaces/tabs in text using HTML/CSS

For spaces, use &nbsp;, for (less than, ...READ MORE

answered Jun 1 in CSS by Edureka
• 9,540 points
24 views
0 votes
1 answer

How to add border in my clip-path: polygon(); CSS style

Using an SVG Dilation Filter to Add ...READ MORE

answered Jun 21 in CSS by Edureka
• 9,540 points
134 views
0 votes
1 answer

What is WebKit and how is it related to CSS?

In the CSS syntax for rendering content ...READ MORE

answered Jun 17 in CSS by Edureka
• 9,540 points
18 views
0 votes
0 answers

Error: 'node-sass' version 5.0.0 is incompatible with ^4.0.0

Using the command: npx create-react-app I created ...READ MORE

May 19 in Others by Kichu
• 19,040 points
417 views
0 votes
1 answer

How can I remove a port from url for node app using nginx

If you run your node server on ...READ MORE

answered Apr 10, 2018 in DevOps on Cloud by ajs3033
• 7,280 points
2,734 views
0 votes
3 answers

ReactJS vs Angular Comparison: Which is better?

One picture, many facts How can you compare ...READ MORE

answered Aug 11, 2018 in Events & Trending Topics by slayer
• 29,310 points
440 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP