New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

single-spa-vue

Package Overview
Dependencies
Maintainers
2
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

single-spa-vue - npm Package Compare versions

Comparing version 0.0.3 to 0.1.0

2

package.json
{
"name": "single-spa-vue",
"version": "0.0.3",
"version": "0.1.0",
"description": "a single-spa plugin for vue.js applications",

@@ -5,0 +5,0 @@ "main": "lib/single-spa-vue.js",

@@ -8,3 +8,3 @@ const defaultOpts = {

export default function singleSpaReact(userOpts) {
export default function singleSpaVue(userOpts) {
if (typeof userOpts !== 'object') {

@@ -27,2 +27,7 @@ throw new Error(`single-spa-vue requires a configuration object`);

// use Vuex
if (opts.Vuex) {
opts.Vue.use(opts.Vuex);
}
// Just a shared object to store the mounted object state

@@ -42,5 +47,15 @@ let mountedInstances = {};

function mount(opts, mountedInstances) {
function mount(opts, mountedInstances, props) {
return new Promise((resolve, reject) => {
mountedInstances.instance = new opts.Vue(opts.appOptions);
const {
store,
globalEventDistributor
} = props;
const vueOpt = {
...opts.appOptions,
store
}
const extendedVue = opts.Vue.extend();
extendedVue.prototype.globalEventDistributor = globalEventDistributor;
mountedInstances.instance = new extendedVue(vueOpt);
resolve();

@@ -47,0 +62,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