Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-no-ssr

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-no-ssr - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

4

dist/vue-no-ssr.common.js
/*!
* vue-no-ssr v0.2.1
* vue-no-ssr v0.2.2
* (c) 2017-present egoist <0x142857@gmail.com>

@@ -35,3 +35,3 @@ * Released under the MIT License.

},
this.placeholder
this.$slots.placeholder || this.placeholder
)

@@ -38,0 +38,0 @@ }

/*!
* vue-no-ssr v0.2.1
* vue-no-ssr v0.2.2
* (c) 2017-present egoist <0x142857@gmail.com>

@@ -39,3 +39,3 @@ * Released under the MIT License.

},
this.placeholder
this.$slots.placeholder || this.placeholder
)

@@ -42,0 +42,0 @@ }

/*!
* vue-no-ssr v0.2.1
* vue-no-ssr v0.2.2
* (c) 2017-present egoist <0x142857@gmail.com>
* Released under the MIT License.
*/
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):e.NoSSR=n()}(this,function(){"use strict";return{name:"no-ssr",props:["placeholder"],data:function(){return{canRender:!1}},mounted:function(){this.canRender=!0},render:function(e){return this.canRender?this.$slots.default&&this.$slots.default[0]:e("div",{class:["no-ssr-placeholder"]},this.placeholder)}}});
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):e.NoSSR=n()}(this,function(){"use strict";return{name:"no-ssr",props:["placeholder"],data:function(){return{canRender:!1}},mounted:function(){this.canRender=!0},render:function(e){return this.canRender?this.$slots.default&&this.$slots.default[0]:e("div",{class:["no-ssr-placeholder"]},this.$slots.placeholder||this.placeholder)}}});
//# sourceMappingURL=vue-no-ssr.min.js.map
{
"name": "vue-no-ssr",
"version": "0.2.1",
"version": "0.2.2",
"description": "Vue component to wrap non SSR friendly components",

@@ -5,0 +5,0 @@ "repository": {

@@ -39,3 +39,3 @@ # vue-no-ssr

Use a component or text as placeholder until `<no-ssr />` is mounted on client-side.
Use a slot or text as placeholder until `<no-ssr />` is mounted on client-side.

@@ -48,5 +48,10 @@ eg, show a loading indicator.

<h1>My Website</h1>
<no-ssr :placeholder="Loading">
<!-- this component will only be rendered on client-side -->
<!-- use slot -->
<no-ssr>
<comments />
     <comments-placeholder slot="placeholder" />
   </no-ssr>
<!-- or use text -->
<no-ssr placeholder="Loading...">
<comments />
</no-ssr>

@@ -60,7 +65,2 @@ </div>

export default {
data() {
return {
Loading: require('./Loading.vue')
}
},
components: {

@@ -67,0 +67,0 @@ 'no-ssr': NoSSR

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc