简体   繁体   中英

How to do versioning for assets in a CRA (create-react-app)?

I need to add versioning to assets, meaning images and bundled js files. Such that I can set control-cahce headers. Never really touched any aspect of this in web development before, relatively new.

"react-scripts": "^1.1.5",

But I am unsure of how to do this, any suggestions?

I did not realize the assets that wasn't versioned properly was not inside src. It was assets outside the webpack scope. Just moved them from public and use module imports instead to make it work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM