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

babel-plugin-transform-cx-imports

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-cx-imports

Rewrite Cx imports for simplicity and optimal output size.

  • 17.4.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
97
decreased by-5.83%
Maintainers
1
Weekly downloads
 
Created
Source

babel-plugin-transform-cx-imports

What this is plugin is used for?

  1. Rewrites Cx imports to use src files which may result with smaller builds:

import { TextField} from 'cx/widgets'

becomes

import { TextField} from 'cx/src/form/TextField'.

  1. Include SCSS files for imported components (experimental).

import { TextField} from 'cx/widgets'

adds also

import 'cx/src/form/TextField.scss'.

Usage

To use src files, use:

//.babelrc
"plugins": [
    ["transform-cx-imports", { useSrc: true }]
]

Note that if using src files, your babel/webpack configuration should whitelist cx path.

Optionally, if you want to include .scss files, use:

//.babelrc
"plugins": [
    ["transform-cx-imports", { sass: true }]
]

Keywords

FAQs

Package last updated on 24 Mar 2017

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