search

Home  >  Q&A  >  body text

How to elegantly synchronize version numbers in laravel-mix online environment?

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! ! !

阿神阿神2822 days ago754

reply all(1)I'll reply

  • 我想大声告诉你

    我想大声告诉你2017-05-18 10:54:35

    Isn’t Laravel-Mix itself based on Webpack? There are many ways to add version numbers to files in Webpack.

    reply
    0
  • Cancelreply