Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

NameUnknown's avatar

How do I specify version of build in vite 3.0?

How do I specify version of build of /build/assets/app in vite 3.0? In webpack, it can be done with webpack.mix(). I need the version of /build/assets/app to change each time I run build command.

0 likes
5 replies
Sinnbeck's avatar
Sinnbeck
Best Answer
Level 102

It automatically gets added/changed whenever your content has changed. What do you need it for ?

NameUnknown's avatar

@Sinnbeck Unfortunately it doesn't. Maybe I do something wrong. But the hash remains the same after each build. I need it to avoid loading previous build version from cash.

NameUnknown's avatar

@Sinnbeck You were right. The issue was that there was another file that remained same all along. Other files I changed reflected their version correctly. Thanks a ton!

Please or to participate in this conversation.