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

@xsyx/common-portal

Package Overview
Dependencies
Maintainers
8
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xsyx/common-portal

### 业务模块通用要求 1. 名称规范: m-业务名-功能名 > 如: m-basic-setting, m-basic-userlist

  • 0.1.19
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
8
Weekly downloads
 
Created
Source

通用 PORTAL 平台原型

业务模块通用要求

  1. 名称规范: m-业务名-功能名

如: m-basic-setting, m-basic-userlist

  1. 为了和 one portal 对接, 入口要求以function 包裹,从而接入 portal 应用的上下文,如下

vue 默认

new Vue({
    el: selector,
    render(h){
        return h(App);
    },
})

注入 portal 上下文

export default function(selector, context){
    return new Vue({
        el: selector,
        render(h){
            return h(App);
        },
    })
}

编译选项

  1. 为了集成到 on portal 应用,业务模块必须以 umd 规范输出;
  2. 为了使用 unpkg 动态加载,业务模块必须取消代码分割,同时内联css
  3. 可将 Vue element 作为 externals 输出,减少业务模块打包体积
module.exports = {
    filenameHashing: false,
    configureWebpack: () => ({
        // ...
        // 取消代码分割
        optimization: {
            splitChunks: false
        },
        // 抽出公共资源减少打包体积
        externals: {
            vue: 'Vue',
            'element-ui': 'ELEMENT',
        }
        // ...
    }),
    // 样式内联
    css: {
        extract: false
    },
    // ...
}

FAQs

Package last updated on 09 Oct 2019

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

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