🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@ibuild-community/preset-applet

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ibuild-community/preset-applet

云筑智联小程序 babel preset

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

preset-applet

云筑智联小程序preset

Install

$ npm i @ibuild-community/preset-applet --save-dev

Usage

preset-applet 共包含两个 babel-plugin

  • 转换 Import('./a') 这种语法为 Import(require('./a'))

  • 转换 import React from react

const _react = __AppletRequire('react'); const React = _react;



`.babelrc`中进行配置

```json
{
  presets:[...,"module:@ibuild-community/preset-applet"]
}

也可以只单独使用某个 plugin

{
  plugins: [
    [
      "@ibuild-community/preset-applet/plugins/transform-import-expression"
    ]
  ]
}

FAQs

Package last updated on 08 Aug 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