3.0.4
https://github.com/ivansieder/vue-cli-nested-index-files-bug
Node 10.11.0 / yarn 1.10.1 / Ubuntu 18.04
nested index.html files (inside the other directory) should be copied to the dist folder.
The index.html files (no matter in which subdirectory) are being ignored.
This "fix" does actually work, but there is an issue when using multi-page-setup, as in that situation, html-webpack-plugin will take it as a template AND the file will be copied, too. What's the desired output here? Wouldn't it be better to generally copy ALL files, which are not being used as a template somewhere instead of only ignoring index.html files? This way someone could also get the public/index.html copied, if it's not being used as an HTML template.
Update on this one: I've opened up a PR for the copy-webpack-plugin (https://github.com/webpack-contrib/copy-webpack-plugin/pull/295) to allow granular file exclusions using a custom validation function. As soon as that is done, it could be implemented with the vue CLI (if this is actually wanted by the core team) to really only exclude those files, which have been used as templates and copy all other files properly.
I fix it in vue.config.js
{
  ...
  chainWebpack: config => {
    config.plugin('copy').tap(([options]) => {
      options[0].ignore = ['./index.html', '.DS_Store']
      return [options]
    })
  }
}
                    Hi @panjiang, I am not quiet sure that this is working (mostly for index.html files in sub-folders), because the ignore option matches glob patterns. Does this work for you also for files index.html files in sub folders?
https://github.com/webpack-contrib/copy-webpack-plugin/blob/master/src/processPattern.js#L68
Yes, It worked for me.
Most helpful comment
Update on this one: I've opened up a PR for the copy-webpack-plugin (https://github.com/webpack-contrib/copy-webpack-plugin/pull/295) to allow granular file exclusions using a custom validation function. As soon as that is done, it could be implemented with the vue CLI (if this is actually wanted by the core team) to really only exclude those files, which have been used as templates and copy all other files properly.