All Products
Document Center


Last Updated: Apr 12, 2022

Kylin-plugin-resource is a resource interception mechanism designed for global offline resource packages on the mPaaS platform.

Use the plug-in

The package.json file in the scaffold file contains the following configuration:

    "map": {
      "vue": {
        "external": "Vue",
        "js": ""
      "fastclick": {
        "external": "FastClick",
        "js": ""

The above configuration indicates that some actions will be implemented when the following dependency statements appear:

import xxx from 'vue';
var xxx = require('vue');

When the vue dependency is used, the following actions are implemented:

  1. Inject the <script src="" ></script> script resource into the generated HTML template.

  2. Redirect the preceding vue dependency to the value of window.Vue.