Socket
Socket
Sign inDemoInstall

babel-plugin-remove-export-keywords

Package Overview
Dependencies
Maintainers
4
Versions
64
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


Version published
Weekly downloads
3K
increased by7.93%
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 29 Jul 2020

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