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

@badrap/preload

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@badrap/preload - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

2

package.json
{
"name": "@badrap/preload",
"version": "0.0.1",
"version": "0.0.2",
"description": "Data preloading for vue-router, similar to Sapper's preload or Nuxt.js's asyncData",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -13,2 +13,4 @@ # @badrap/preload [![CircleCI](https://circleci.com/gh/badrap/preload.svg?style=shield)](https://circleci.com/gh/badrap/preload)

A modified of the following examples is available at [CodeSandbox](https://codesandbox.io/s/zywnmy35x?initialpath=%23%2Ffoo).
### Basic Setup

@@ -22,4 +24,4 @@

import preload from "@badrap/preload"; // Import preload.
import Foo from "./foo.vue"; // Import a couple of route components which
import Bar from "./bar.vue"; // we decorate with preload.
import Foo from "./Foo.vue"; // Import a couple of route components which
import Bar from "./Bar.vue"; // we decorate with preload.

@@ -36,5 +38,7 @@ Vue.use(VueRouter);

});
const app = new Vue({
router
}).$mount('#app')
new Vue({
router,
template: "<router-view />"
}).$mount("#app");
```

@@ -46,9 +50,7 @@

Let's define **Foo** in **foo.vue**:
Let's define **Foo** in **Foo.vue**:
```vue
<template>
<div>
{{ greeting }}, {{ ip }}!
</div>
<div>{{ greeting }}, {{ ip }}!</div>
</template>

@@ -55,0 +57,0 @@

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