请问一下,我使用.scss文件作为样式文件,为什么没有生效呢?
来源:5-10 左侧收尾工作

慕慕0439991
2020-10-21
尊敬的张老师,您好,我使用.scss文件作为样式文件,不过好像没有生效,
我是这样写的,
import React from 'react';
import './Module.scss';
export default function Module(): JSX.Element {
return (
<div style={{ background: 'rgb(39,43,48)' }}>
<h1>This is the HomePage</h1>
<div className="app-homepage-main">
<ul>
{/* ul是无序列表标签 */}
<li>
<a href="#" className="p-5 file-upload">
<i className="fas fa-folder-plus fa-9x"></i>
<h6>New Project</h6>
</a>
</li>
</ul>
</div>
</div>
);
}
文件夹中好像多了一个Module.scss.d.ts文件,也不知道是做什么用的;
期待您的回复!
写回答
1回答
-
张轩
2020-10-22
同学你好 你的 create-react-app 是否设置了 sass 对应的处理器?默认是没有的。
012020-10-22
相似问题