New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

vue-micro

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-micro

vue-micro, A tiny library to split large vue applications.

latest
Source
npmnpm
Version
1.0.8
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

vue-micro

A tiny library to split large vue applications.

vue-micro

features

  • Accessible for vue ecosystem. vue 3.x and vue-router 4.x are required.
  • Can be used based on central esm registry or customized location.
  • Base url supported, easy to mount and integrate with current application,
  • A very tiny library (~2kb)

install & usage

npm install vue-micro -S

//vue-router
import router from './router';

// import micro library
import micro from './micro';

load esm dynamically

// from central registry
micro(router, 'https://registry.npm.js/libs');

// from customized url
micro(router, {
  micro_app_1_0_3: 'http://registry.npm.js/libs/micro_app1.0.3.esm.js,
  micro_app_other: 'http://registry.npm.js/libs/micro_app.other.esm.js'
  micro_app_module3: 'http://registry.npm.js/libs/micro_app.module3.esm.js'
  // ...
  // ...
})

mounting point, default: /micro/

micro(router, {}, '/another_mounting_point/');

Micro application Conventions

import app_routes from './application.routes.js';

export default {
  id: 'applicationId', // application Id
  routes: app_routes, // application routes
  methods: {
    clickHandler() {
      console.log('done');
    }
  },
  data() {
    return {
      foo: 'foovalue'
    };
  },
  render() {
    return h('span', 'Iam a micro application');
  }
};

Keywords

micro

FAQs

Package last updated on 16 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts