New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

babel-preset-wsc-pc

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-preset-wsc-pc

wsc babel preset

  • 1.0.3
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
10
increased by11.11%
Maintainers
1
Weekly downloads
 
Created
Source

babel-preset-wsc-pc

这个插件集合,将几个 wsc-pc 常用的 babel 插件包进来,另加入了 react 业务组件样式的按需引入,在使用 react-components 时,不需要再单独引入样式文件了。

使用须知

这个插件仅在 wsc-pc-xxx node 的 v4 项目中使用。

特性

主要集成了以下插件:

  • react 业务组件的样式按需引用
  • zent 组件和样式的按需引用 (babel-plugin-zent)
  • vant、captain-ui、@youzan/captain-showcase 等 vue 组件的按需引用 (babel-plugin-import)
  • lodash 的按需引入 (babel-plugin-lodash)

使用

yarn add babel-preset-wsc-pc --save

配置示例:

// In your .babelrc
{
	"preset": [
		"babel-preset-wsc-pc",
        {
            "components": ["@youzan/list-modal"], // 需要按需引入样式的组件列表,不写就为默认所有业务组件
            "automaticStyleImport": true // 同 babel-plugin-zent 的配置
        }
	]
}

FAQs

Package last updated on 09 Nov 2018

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