question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

  • Adding ssr build
  • Utilize Vue.use() #28 so you can ssr: false in nuxt.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:11
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
sebastianjungcommented, Aug 6, 2019

you are absolutely right. i’m not sure why i implemented it this way to be honest. Maybe i was trying to do the ssr: false thingy 😕

Still doesn’t work with nossr, though. Its hanging in an infinite reloading loop.

EDIT: It seems my chrome is buggy. Running it as npm run generate from my server fixes the problem in chrome.

So what finally worked for me 🚀:

<no-ssr>
      <cookie-law theme="dark-lime" button-text="Ok">
        bla
      </cookie-law>
</no-ssr>

and in the script tag:

const CookieLaw = () => import('vue-cookie-law')
export default {
  components: {
    CookieLaw
  }
}

@apertureless Thank you for your advice. Appreciate it!

0reactions
aperturelesscommented, Aug 6, 2019

Oh yeah sorry forgot to change that. The package was renamed to vue-client-only. Thus you also need to

import ClientOnly from 'vue-client-only'

and then

<client-only>
	<cookie-law>stuff</cookie-law>
</client-only>
Read more comments on GitHub >

github_iconTop Results From Across the Web

How Server side rendering (SSR) useful to improve lighthouse ...
Here, we will explain the worth of rendering and how it plays an important role to improve the lighthouse score. Apart from that,...
Read more >
What is server-side rendering and how does it improve site ...
Server-side rendering (SSR) addresses the performance and search engine optimization issues of single-page JavaScript applications.
Read more >
Improving Web Page Performance Server-Side Rendering ...
Why server-side rendering (SSR) improves a site; Common pitfalls to avoid when moving to SSR; Measuring performance to ensure meeting ...
Read more >
Improve app performance with React server-side rendering
React server-side rendering offers performance benefits vs. client-side rendering. Learn about different React SSR frameworks.
Read more >
@enhance/ssr - npm
Server-side rendering for custom elements with template and slots support. Latest version: 3.0.9, last published: 3 months ago.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found