Angular generates unique file names when you build your application. Angular does this by adding the file checksum (hash) to the filename.
Why? Browsers and proxies can cache files. When you build a new version of your application you want users to get the new files, not the old ones from a cache. Because Angular generates unique file names, these files are not in any cache and users get the new version.
However, Angular only does this depending on the configuration (outputHashing
configuration option). I am guessing that you get the files with the hash on a production build (ng build --prod
) and the plain file names on a development build (ng build
).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…