
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@babel/plugin-external-helpers
Advanced tools
This plugin contains helper functions that’ll be placed at the top of the generated code
@babel/plugin-external-helpers is a Babel plugin that allows you to use Babel's helper functions from an external source rather than including them in every file. This can help reduce the overall bundle size by avoiding duplication of helper functions across multiple files.
Externalizing Babel Helpers
This configuration in your Babel setup will enable the use of external helpers. Instead of including Babel's helper functions in every file, they will be imported from an external source, reducing redundancy and potentially decreasing the bundle size.
module.exports = {
plugins: [
'@babel/plugin-external-helpers'
]
};
Using with a Custom Helper Library
You can specify a custom version of the helper library to use. This is useful if you have a specific version of Babel's helpers that you want to ensure compatibility with.
module.exports = {
plugins: [
['@babel/plugin-external-helpers', {
helperVersion: '7.0.0'
}]
]
};
babel-plugin-transform-runtime is another Babel plugin that helps to avoid duplication of helper functions by using a runtime library. Unlike @babel/plugin-external-helpers, which relies on externalizing helpers, transform-runtime uses a runtime library to achieve similar goals, often leading to smaller bundle sizes and avoiding polluting the global scope.
babel-plugin-external-helpers-2 is a fork of @babel/plugin-external-helpers with additional features and improvements. It aims to provide more flexibility and better performance compared to the original plugin.
This plugin contains helper functions that’ll be placed at the top of the generated code
See our website @babel/plugin-external-helpers for more information.
Using npm:
npm install --save-dev @babel/plugin-external-helpers
or using yarn:
yarn add @babel/plugin-external-helpers --dev
v7.24.7 (2024-06-05)
babel-node
babel-traverse
constantViolations
with destructuring (@liuxingbaoyu)babel-helper-transform-fixture-test-runner
, babel-plugin-proposal-explicit-resource-management
using
in switch
correctly (@liuxingbaoyu)babel-helpers
, babel-runtime-corejs2
, babel-runtime-corejs3
, babel-runtime
FAQs
This plugin contains helper functions that’ll be placed at the top of the generated code
The npm package @babel/plugin-external-helpers receives a total of 212,099 weekly downloads. As such, @babel/plugin-external-helpers popularity was classified as popular.
We found that @babel/plugin-external-helpers demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.