Skip to content

fix(cli-service): Fix copy plugin's ignore pattern (fix #3119) #3130

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

Merged
merged 2 commits into from
Jan 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/@vue/cli-service/__tests__/build.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ test('build', async () => {

// test public copy
project.write('public/foo.js', '1')
// make sure that only /public/index.html is skipped (#3119)
project.write('public/subfolder/index.html', '1')

const { stdout } = await project.run('vue-cli-service build')
expect(stdout).toMatch('Build complete.')
Expand All @@ -22,6 +24,7 @@ test('build', async () => {
expect(project.has('dist/js')).toBe(true)
expect(project.has('dist/css')).toBe(true)
expect(project.has('dist/foo.js')).toBe(true)
expect(project.has('dist/subfolder/index.html')).toBe(true)

const index = await project.read('dist/index.html')
// should split and preload app.js & vendor.js
Expand Down
2 changes: 1 addition & 1 deletion packages/@vue/cli-service/lib/config/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ module.exports = (api, options) => {
const multiPageConfig = options.pages
const htmlPath = api.resolve('public/index.html')
const defaultHtmlPath = path.resolve(__dirname, 'index-default.html')
const publicCopyIgnore = ['index.html', '.DS_Store']
const publicCopyIgnore = ['.DS_Store']

if (!multiPageConfig) {
// default, single page setup.
Expand Down