Skip to content

Upgrade to nuxt2 #4

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Upgrade to nuxt2 #4

wants to merge 4 commits into from

Conversation

pi0
Copy link

@pi0 pi0 commented May 13, 2019

Hi. Thanks for this clean repo. Here is the summary of changes:

  • Update to nuxt@2.x
  • Use nuxt-start dependency for deployment which is 8.6M install size comparing to nuxt (71.8M)
  • No need to wrap SSR renderer to express
  • Await for nuxt.ready() which is essential for nuxt2
  • Don't prefix publicPath. Assets are fully hashed so no conflict should happen between deployments. It also makes this example simpler.

@bsthomsen
Copy link

@pi0 wouldn't still be nice to use express server to serve the static files like js that has already been generated during npm run build. And to control the headers etc with something like helmetjs?

And any reason you disable gzip compression?

@pi0
Copy link
Author

pi0 commented Jul 6, 2019

  • Using custom server is going to be discouraged soon. Express has unnecessary overhead and headers are still configurable using nuxt config / middleware
  • For gzip it would be better that reverse proxy layer handle it for faster SSR and less cost

@bsthomsen
Copy link

@pi0 cool, getting some strange error though disabling the gzip compression. One of the bundled files keeps giving 502. And besides this it doesn't output errors to the cloudwatch logs, is it because nuxt-start in production chokes all the errors?

@pi0
Copy link
Author

pi0 commented Jul 11, 2019

@bsthomsen there is no logging difference between nuxt and nuxt-start (just no builder dependencies). Would you please try adding this to entry point? That may help to debug the issue.

  process.on('unhandledRejection', (err) => {
    console.error(err)
  })

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