Old Ma Nong, jQuery is used to it.
recently learned to use express, in the process of finding data, there are many examples of the combination of express and webpack.
in fact, I can understand the combination of webpack and vue, or self-written pages, because you can package it into a separate file, and then publish or copy it into your own project (whether it"s a java project or a php project).
but since express is already running a web service (which itself is a web project), why package it again with webpack?
even if it is packaged, it should be packaged to the pages or resource files it uses.
for the above doubts, please help me to click.
< hr > in addition, when packaging with webpack, to prevent the cache that exists during browser access from affecting the test results, you can add the output file name to the hash value ( index.xxxxxxxxxxxxx.js
). I would like to ask how to easily apply this kind of file to the project (such as the java project).
according to my current understanding, the whole process should be, after the front-end development, use webpack to package the js file, and output the packaged file to the corresponding resource file directory of the java project, while the html file of the java project already exists in the project view directory, and only needs to reference a js file in it. But what about the hash value added to this file name? Do you also have to manually write the file name with the hash value every time?