My question sounds very basic but I do not know the answer and I could not found them by searching.
I have seen files like vue.config.js created by vue-cli. I have also seen files like Content.vue.js.
I thought that after period ., it is the file extension. How can these two have two period?
What is the difference between .config.js and .vue.js files to normal .js files? When to use them?
Thank you!
I think that it helps to free your mind of any kind of strict view of file extensions. File extensions don't really exist, they are just an optional hint put there by whoever created the file as to what the content or the format might be. You could have a file with no extension, or a file that is "only" an extension (often called dotfiles and used for configuration), like .gitignore or .bashrc.
So, in this case, the creator of vue.config.js decided that the best hint for the content is the "extension" .config.js. It can have two periods because there aren't really any strict rules saying that it can't.