Reactjs 如何在index.html.js应用程序中导入引导和fontasome

Reactjs 如何在index.html.js应用程序中导入引导和fontasome,reactjs,Reactjs,使用此命令安装引导程序(npm Installbootstrap@4.0.0-α.6) 我的index.html文件是: 根据这个问题,我可以添加来自其他前台框架()的css,并使其正常工作。我 超级税 (函数(e,t){var n=e.amplitude{u q:[],{u iq:{}};var r=t.createElement(“脚本”) ;r.type=“text/javascript”;r.async=true ;r.src=”https://cdn.amplitude.com/l

使用此命令安装引导程序(npm Installbootstrap@4.0.0-α.6) 我的index.html文件是:

根据这个问题,我可以添加来自其他前台框架()的css,并使其正常工作。我


超级税
(函数(e,t){var n=e.amplitude{u q:[],{u iq:{}};var r=t.createElement(“脚本”)
;r.type=“text/javascript”;r.async=true
;r.src=”https://cdn.amplitude.com/libs/amplitude-4.0.0-min.gz.js"
;r.onload=function(){if(e.amplium.runQueuedFunctions){
e、 Amplication.runQueuedFunctions()}else{
console.log(“[Amplication]错误:无法加载SDK”)}
;var i=t.getElementsByTagName(“脚本”)[0];i.parentNode.insertBefore(r,i)
;函数s(e,t){e.prototype[t]=函数(){
this.q.push([t].concat(Array.prototype.slice.call(arguments,0));返回this}
var o=function(){this.\u q=[];返回this}
;变量a=[“添加”、“附加”、“清除所有”、“预结束”、“设置”、“设置一次”、“取消设置”]
;对于(var u=0;u

使用npm安装引导程序后,在react应用程序中,转到index.js文件并添加import'bootstrap/dist/css/bootstrap.css'


有关字体的详细信息,请参阅。有人在stackoverflow中发布了帖子。

如果您使用
npm安装引导程序

index.html
文件中删除

然后,将引导CSS文件从
node_modules
导入React应用程序的根
index.js
文件:


导入'node_modules/bootstrap/dist/css/bootstrap.min.css';

下载()在类似CSS的项目文件夹中,然后在index.html中提供路径,我已经尝试过了,但它不工作。如果直接在index.html中提供cdn路径,那么它就工作了。?检查reactstrap。它为React构建了引导组件。更多信息:是的,maxcdn路径工作,但本地不工作