最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

node.js - How to copy scss files to dist package in ReactJS with the same folder structure - Stack Overflow

programmeradmin0浏览0评论

I have created a dist project by compiling my code with the command npx babel src/lib --out-dir dist. But I see my SCSS and image files are missing. How can I get my CSS and images to dist folder ?

I tried by using npx webpack and observed, images and SCSS files getting copied only to root folder. But not according to the same folder structure as It was in src.

I have created a dist project by compiling my code with the command npx babel src/lib --out-dir dist. But I see my SCSS and image files are missing. How can I get my CSS and images to dist folder ?

I tried by using npx webpack and observed, images and SCSS files getting copied only to root folder. But not according to the same folder structure as It was in src.

Share Improve this question edited Mar 18 at 13:15 Jean-Loup 3982 gold badges6 silver badges18 bronze badges asked Mar 12 at 18:03 Amarathun OshadieAmarathun Oshadie 132 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

Append --copy-files flag to your build command like this.

 npx babel src/lib --out-dir dist --copy-files
发布评论

评论列表(0)

  1. 暂无评论