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

(generate) dont assume /index.html exists when copying to 200.html #1937

Merged
merged 1 commit into from Oct 24, 2017

Conversation

pimlie
Copy link

@pimlie pimlie commented Oct 23, 2017

It may be an edge-case but users might not have a /index.html in their project. So only copy it to 200.html if an index file exists.

@Atinux Atinux merged commit d787ab4 into nuxt:dev Oct 24, 2017
@pi0
Copy link
Member

pi0 commented Oct 24, 2017

Thanks @pimlie :) I was planning to make this fix too

if (!existsSync(_200Path)) {
await copy(join(this.distPath, 'index.html'), _200Path)
const indexPath = join(this.distPath, 'index.html')
if (existsSync(indexPath) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing a ) here

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops 👎

thanks for spotting that

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened a pr to fix : #1950

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no idea how i missed that, same issue is in nuxt-generate-cluster and I worked on that all yesterday evening without noticing 😕

i will go stand in the corner

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't worry, CI can help us to find out it 😸 .

@pimlie pimlie deleted the issue-no-index branch September 14, 2018 08:50
@lock
Copy link

lock bot commented Oct 31, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 31, 2018
@danielroe danielroe added the 2.x label Jan 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants