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

@kokojs/babel-preset-miniapp

Package Overview
Dependencies
Maintainers
0
Versions
252
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kokojs/babel-preset-miniapp

Babel preset for miniapp projects.

  • 4.0.27
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
104
decreased by-71.97%
Maintainers
0
Weekly downloads
 
Created
Source

Babel 预设配置 - 小程序

babel-preset-miniapp 是有赞小程序应用统一的 Babel 配置。

使用方式

安装

yarn add @kokojs/babel-preset-miniapp --dev

配置

babel.config.js 中添加对应的 preset:

module.exports = {
  presets: ['@kokojs/babel-preset-miniapp'],
};

内置插件列表

@babel/preset-env

用于 polyfill ESNext 语法。

@babel/plugin-transform-runtime

用于将 Babel helper 转换为 import 形式,减少代码体积。

@babel/preset-typescript

用于转换 TypeScript 语法。

babel-plugin-import

用于组件库按需引入,目前包含以下组件库:

  • @youzan-open/vant-tee
@babel/plugin-proposal-class-properties

用于转换 class 的属性。

@babel/plugin-proposal-decorators

装饰器语法支持。

维护者

陈嘉涵。

FAQs

Package last updated on 18 Dec 2024

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