In Vue, how to include .htaccess to production using npm run build?

I'm using Vue CLI 3 and vue-router mode history and had this problem. Found out that after I run npm run build, I need to put .htaccess inside the dist folder.

How to make npm run build to automatically include the .htaccess so that I don't need to manually copy it into dist folder? I have the .htaccess in /src folder.

I found this solution from google search, but it is for angular.