Used laravel-mix to open the version number
Currently, two methods are used when updating the version number of online servers
1 The server installs nodejs and updates the resource files. Manually or monitors or automatically runs the node process and recompiles the new resource version. Disadvantages The server needs to install node
2 Manually upload the new resource file version and mix-manfiest.json
Disadvantage: Manually upload the node compiled file version and mix-manfiest.json
It doesn’t feel elegant at all.
If you use Alibaba Cloud CDN, you can only use the second method to update the server version number
Upload mix-manfiest.json
Then compile the resource file to cdn
I feel like I am very low, there should be a better way! ! !
Isn’t Laravel-Mix itself based on Webpack? There are many ways to add version numbers to files in Webpack.