Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
babel-plugin-extract-export
Advanced tools
Extract ESM exports and their dependencies using Babel.
This is a fork of the NextJS SSG transform Babel plugin that reverses the logic and allows extracting a specific export and its dependencies.
yarn add babel-plugin-extract-export
const babel = require('@babel/core')
const syntaxTypeScript = require('@babel/plugin-syntax-typescript')
const extractExport = require('babel-plugin-extract-export')
const jsx = `
import { Image } from 'system'
export const Avatar = () => <Image />
type SystemProps = { as: any }
type BoxProps = { children: any } & SystemProps
export const Box = (props: BoxProps) => <div {...props} />
`
const result = babel.transform(jsx, {
configFile: false,
plugins: [
[syntaxTypeScript, { isTSX: true }],
[extractExport, { exportName: 'Avatar' }],
],
})
// Output:
// import { Image } from 'system'
// export const Avatar = () => <Image />
yarn install && yarn test
FAQs
Extract ESM exports and their dependencies using Babel.
The npm package babel-plugin-extract-export receives a total of 183 weekly downloads. As such, babel-plugin-extract-export popularity was classified as not popular.
We found that babel-plugin-extract-export demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.