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

babel-plugin-remove-export-keywords

Package Overview
Dependencies
Maintainers
4
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-remove-export-keywords

Remove plugin export keywords

  • 1.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.9K
decreased by-3.74%
Maintainers
4
Weekly downloads
 
Created
Source

babel-plugin-remove-export-keywords

Remove export keywords by coercing them into variable declarations. Used by MDX.

Installation

yarn add babel-plugin-remove-export-keywords

Usage

const babel = require('@babel/core')

const plugin = require('babel-plugin-remove-export-keywords')

const jsx = `
export const Foo = () => (
  <div>
    <Button />
  </div>
)
`

const plugin = new BabelPluginApplyMdxTypeProp()

const result = babel.transform(jsx, {
  configFile: false,
  plugins: [
    '@babel/plugin-syntax-jsx',
    plugin
  ]
})

console.log(result.code)

Input

export const Foo = () => (
  <div>
    <Button />
  </div>
)

Output

const Foo = () => (
  <div>
    <Button mdxType="Button" />
  </div>
)

License

MIT

Keywords

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

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