Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/38.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
CSS样式表不是';t在我键入“后在html网页上加载”;“npm运行启动”;_Html_Css_Reactjs_Webpack - Fatal编程技术网

CSS样式表不是';t在我键入“后在html网页上加载”;“npm运行启动”;

CSS样式表不是';t在我键入“后在html网页上加载”;“npm运行启动”;,html,css,reactjs,webpack,Html,Css,Reactjs,Webpack,我刚刚在我的一个项目中安装了react、webpack和babel(我使用了本教程,但我对webpack.config.js文件进行了一些调整,因为它给出了错误),现在我的html文件的css样式表没有链接(当我键入npm run start时),我不确定为什么 这就是我链接样式表的方式 <link rel="stylesheet" type="text/css" media="screen" href="index-s

我刚刚在我的一个项目中安装了react、webpack和babel(我使用了本教程,但我对webpack.config.js文件进行了一些调整,因为它给出了错误),现在我的html文件的css样式表没有链接(当我键入npm run start时),我不确定为什么

这就是我链接样式表的方式

<link rel="stylesheet" type="text/css" media="screen" href="index-styles.css">
现在我的项目结构是

assets 
images 
node_modules
src
|___index-styles.css (one I'm linking to index.html) 
|___index.css (one used in index.js for tutorial) 
|___index.html
|___index.js
.babelrc
package-lock.json
package.json
webpack.config.js

为什么不直接使用?这可以让你不用去摆弄配置。嗯,好吧,我试试
assets 
images 
node_modules
src
|___index-styles.css (one I'm linking to index.html) 
|___index.css (one used in index.js for tutorial) 
|___index.html
|___index.js
.babelrc
package-lock.json
package.json
webpack.config.js