Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple index.html files in public folder not being published in production #3119

Closed
Roruchi opened this issue Dec 12, 2018 · 1 comment · Fixed by #3130
Closed

Multiple index.html files in public folder not being published in production #3119

Roruchi opened this issue Dec 12, 2018 · 1 comment · Fixed by #3130

Comments

@Roruchi
Copy link

Roruchi commented Dec 12, 2018

Version

3.2.1

Environment info

System:
  OS: Windows 7
  CPU: (8) x64 Intel(R) Core(TM) i7-4810MQ CPU @ 2.80GHz
Binaries:
  Node: Not Found
  Yarn: 1.3.2 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
  npm: 5.6.0 - C:\Program Files\nodejs\npm.CMD
npmGlobalPackages:
  @vue/cli: Not Found

Steps to reproduce

  • Create an empty Vue project
  • Create the following folder structure:
  • Root/public
  • Root/public/index.html
  • Root/public/test/index.html
  • Run the command npm run build

What is expected?

The dist folder to contain public/index.html and the public/test/index.html

What is actually happening?

The dist folder only contains the public/index.html and not the one from the test directory.


Related vue topic:
https://forum.vuejs.org/t/vue-cli-production-build-issues-with-multiple-index-html-files-in-public-folder/51110

@LinusBorg
Copy link
Member

The issue is here:

https://github.com/vuejs/vue-cli/blob/dev/packages/%40vue/cli-service/lib/config/app.js#L143

const publicCopyIgnore = ['index.html', '.DS_Store']

it should probably look like this:

const publicCopyIgnore = ['public/index.html', '.DS_Store']

LinusBorg added a commit that referenced this issue Dec 13, 2018
haoqunjiang pushed a commit that referenced this issue Jan 7, 2019
* fix(cli-service): don't skip copiying of files named "index.html"
when nested in a subfolder in /public

close #3119

* refactor: remove the unused '/index.html' pattern
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants