Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
4.4k views
in Technique[技术] by (71.8m points)

create-react-app 生成的react 项目,每个组件文件下都会生成一个dist文件,怎么去掉

create-react-app 生成的react 项目,每个组件文件下都会生成一个dist文件,怎么去掉image
这个文件里面是编译好的js 和 css。发布的时候也不会带上他们,有什么用。如果去不掉 怎么在git里把这些文件夹全部忽略掉


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
发布的时候也不会带上他们,有什么用

这是webpack build完的文件,供本地预览,调试

如果去不掉 怎么在git里把这些文件夹全部忽略掉

.gitignore里加入

dist/

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...