
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
@automattic/babel-plugin-transform-wpcalypso-async
Advanced tools
A Babel plugin to facilitate optional code-splitting by applying transformations to a `asyncRequire` global function or the `` React component
babel-plugin-transform-wpcalypso-async
is a Babel plugin to facilitate optional
code-splitting by applying transformations to a asyncRequire
global function or the
<AsyncLoad />
React component.
Include in your Babel configuration as a plugin.
Example Babel config file:
{
"plugins": [
[ "@automattic/transform-wpcalypso-async", { "async": true } ]
]
}
See Babel options documentation for more information.
asyncRequire
will transform to one of:
import()
if async
plugin option is true
require
if async
plugin option is false
or unsetignore
plugin option is true
asyncRequire
expects one required argument, with an optional callback:
asyncRequire( 'calypso/components/search', ( Search ) => {
console.log( Search );
} );
<AsyncLoad />
will transform its require
string prop to a function invoking asyncRequire
when called.
// Before:
<AsyncLoad require="calypso/components/search" />;
// After:
<AsyncLoad
require={ function ( callback ) {
asyncRequire( 'calypso/components/search', callback );
} }
/>;
async
- controls whether transformations applied by the plugin should use a dynamic ESM import
statement that enables webpack code-splitting or the synchronous CommonJS require
function. This defaults to false
.ignore
- if set to true
, the asyncRequire
call will be completely removed, and AsyncLoad
will show the placeholder forever and won't do any import. Useful for server side rendering where the render is one-pass and doesn't wait for any imports to finish.FAQs
A Babel plugin to facilitate optional code-splitting by applying transformations to a `asyncRequire` global function or the `` React component
The npm package @automattic/babel-plugin-transform-wpcalypso-async receives a total of 5 weekly downloads. As such, @automattic/babel-plugin-transform-wpcalypso-async popularity was classified as not popular.
We found that @automattic/babel-plugin-transform-wpcalypso-async demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 33 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.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.