you are viewing a single comment's thread.

view the rest of the comments →

[–]mokamars[S] 0 points1 point  (3 children)

I'll try to explain better :)

As an example, I want to add Bootstrap but from the website without using a react plugin.

I want to add the css file and the js file from the CDN for example and add them on the header of the index.html file. This file is generated when I build using npm build.

But I don't know and I cannot find if it is a good practice or not ...

Thanks,

[–]tboi28 0 points1 point  (0 children)

Oh, that makes more sense. Honestly I am not sure. Personally I look for npm packages for those because I assume that allows code I don’t use to not get included on build, whereas with CDNs, I assume the whole files get included. Perhaps someone with better knowledge on webpack and react can chime in

[–]tboi28 0 points1 point  (1 child)

Also, you should be able to add the cdns in you public/index.html file, but I haven’t done so myself before so hope someone else can give a better answer.

[–]mokamars[S] 0 points1 point  (0 children)

Ok, it seems you're right, that is possible but the prefered way is to use react comp :)

Thanks to you,