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

@aliyun-sls/babel-plugin-sls-import

Package Overview
Dependencies
Maintainers
4
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aliyun-sls/babel-plugin-sls-import

用于SLS App Frame加载公共组件的babel import plugin

  • 0.0.11
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
6
increased by50%
Maintainers
4
Weekly downloads
 
Created
Source

介绍

用于SLS App Frame加载公共组件的babel import plugin

本地开发

先执行yarn dev 再执行yarn test,可以看到test目录下文件的转换

样例

plugins: [
  [
    plugin,
    {
      slsLibrary: [
        /^@aliyun-sls\S+/,
        'someModuleName',
        item => {
          return item === 'anotherModuleName';
        },
      ],
    },
  ],
]
import { something, something2 } from 'module1';
import defaultThing from 'module2';
import { something as alias } from 'module3';
import { Button } from '@aliyun-sls/fusion';
import Dashboard from '@aliyun-sls/Dashboard';

<Dashboard></Dashboard>;

      ↓ ↓ ↓ ↓ ↓ ↓

import { something, something2 } from 'module1';
import defaultThing from 'module2';
import { something as alias } from 'module3';

const Button = _sls_import("@aliyun-sls/fusion").Button;

const Dashboard = _sls_import("@aliyun-sls/Dashboard");

/*#__PURE__*/
React.createElement(Dashboard, null);

Keywords

FAQs

Package last updated on 08 Jun 2023

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