npm run build | hash stamp to switch to date stamp

82 views Asked by At

The npm run build command creates hash files For example: 2.777d1846.chunk.css The hash appears in the middle: 777d1846

I want to replace the hash with a date stamp for example: 20230614 I made a script in react that runs in post build and replaces the names of the files and it works very well now the files are: 2.20230614.chunk.css

But the source code is still looking for the file hash... I need to find a way that the npm run build will also pre-build files with a date signature and also write them in the code as it does normally, only it needs to be configured not to use a hash but a date stamp.

btw: I don't have webpack config

0

There are 0 answers