Add the Current Copyright Year to the HTML File in a Vite Project | 8 Hobbies JavaScript Blog

In a project built by Vite, index.html is usually the entry point of the project. While we can put the copyright notice in the JavaScript bundle, it is often desirable to add it directly to the HTML file for various reasons. For example, maybe the copyright notice is entangled with the privacy policy or terms of service links, which we usually want to make visible even when the user turns off JavaScript.


This is a companion discussion topic for the original entry at https://8hob.io/posts/add-copyright-year-vite-html