I tried to setup CopyFiles copy assets/.htaccess to my build directory, to no avail. Nothing works, except renaming it at the source (assets/my.htaccess) and renaming it with the "to" clause:
This works only if there is something before the dot (xxx.htaccess):
.copyFiles({
from: './assets',
to: '.[ext]',
pattern: /\.htaccess$/
})