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

babel-plugin-zent

Package Overview
Dependencies
Maintainers
2
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-zent

  • 3.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
7
decreased by-12.5%
Maintainers
2
Weekly downloads
 
Created
Source

babel-plugin-zent

Pay what you use for Zent.

This plugin can reduce your bundle size by importing only the parts of zent you use in your project.

Prerequisite

This plugin requires Zent >= 3.0.0.

Features

  • Smaller bundle size
  • Automatic component JavaScript import rewrite
  • Automatically import styles for the components you use

Usage

yarn add babel-plugin-zent -D

Configuration example:

// In your .babelrc
{
	"plugins": [
		["zent"]
	]
}

In your component Javascript files, use zent like this: import { Button, Dialog } from 'zent', the plugin will take care of the rest.

Options

  • libraryName: Library to transform
  • noModuleRewrite: disable JavaScript module import rewrite,use with bundle tool's tree-shaking feature.
  • automaticStyleImport: true to enable styles imports for component.
  • useRawStyle: should be used with automaticStyleImport, imports sass source files if set to true. Requires Zent >= 7.0.0
// defaults
{
	libraryName: 'zent',
	noModuleRewrite: false,
	automaticStyleImport: false,
	useRawStyle: false
}

FAQs

Package last updated on 03 Nov 2021

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