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

feat: show build error #45

Merged
merged 8 commits into from
Oct 1, 2019
Merged

feat: show build error #45

merged 8 commits into from
Oct 1, 2019

Conversation

pimlie
Copy link
Contributor

@pimlie pimlie commented Sep 28, 2019

This adds support for an error state which prints a stacktrace on the loading screen.

See the corresponding nuxt pr which uses this so build errors in dev mode are shown on the loading screen.

app/index.js Outdated
@@ -1,4 +1,5 @@
import Vue from 'vue'
import App from './app.vue'

Vue.config.devtools = true
Copy link
Member

Choose a reason for hiding this comment

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

Why we need devtools enabled?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We dont, but had to test/debug the vue-app and with yarn link I still had to build the project to test it with Nuxt. And I thought, why not leave it on, its just a development tool anyway.

Copy link
Member

Choose a reason for hiding this comment

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

It triggers an extra dev tool for end-users during loading. I think loading it may consume little CPU as it has to inspect events, ...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If you are afraid that enabling it could cause problems I have no problem with removing this

lib/module.js Show resolved Hide resolved
@pimlie
Copy link
Contributor Author

pimlie commented Sep 29, 2019

I was thinking this morning that maybe we should add a message that it might be possible that the Nuxt server needs to be restarted manually? E.g. if you add a wrong plugin then thats the case

@pi0
Copy link
Member

pi0 commented Sep 29, 2019

Good idea about restart suggestion.

fix: add missing files
@pimlie
Copy link
Contributor Author

pimlie commented Sep 29, 2019

After the latest commit the page now looks like this, let me know what you think:

image

lib/loading.js Outdated Show resolved Hide resolved
Copy link
Member

@pi0 pi0 left a comment

Choose a reason for hiding this comment

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

Nice refactors ❤️

@pi0 pi0 merged commit 9f23404 into master Oct 1, 2019
@pimlie pimlie deleted the feat-show-build-error branch October 1, 2019 14:25
}

clearStates (hasErrors) {
this.status = []
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@pi0 oops, made a typo here! should be states not status

Copy link
Member

Choose a reason for hiding this comment

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

Would you please make direct commit to master?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this message was to ping you asap in case you were already releasing ;)

Copy link
Member

Choose a reason for hiding this comment

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

I won't release without proper testing ;)

This was referenced Oct 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants