Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
swc-plugin-transform-cx-imports
Advanced tools
Rewrite Cx imports for simplicity and optimal output size.
Having improved performance, this plugin replaces babel-plugin-transform-cx-imports
.
src
files which may result in smaller builds:import { TextField } from 'cx/widgets'
becomes
import { TextField } from 'cx/src/form/TextField'
import { TextField } from 'cx/widgets'
also adds
import 'cx/src/form/TextField.scss'
Install the package using the yarn add swc-plugin-transform-cx-imports
command. This plugin requires another plugin, which you can install using the yarn add swc-plugin-transform-cx-jsx
.
Inside the webpack.config.js
file, import manifest from 'cx/manifest'
- const manifest = require('cx/manifest');
, and replace babel-loader
with swc-loader
:
{
loader: 'swc-loader',
options: {
jsc: {
loose: true,
target: 'es2022',
parser: {
syntax: 'typescript',
decorators: true,
tsx: true,
},
experimental: {
plugins: [
[
require.resolve('swc-plugin-transform-cx-jsx/swc_plugin_transform_cx_jsx_bg.wasm'),
{ trimWhitespace: true, autoImportHtmlElement: true },
],
[
require.resolve('swc-plugin-transform-cx-imports/swc_plugin_transform_cx_imports_bg.wasm'),
{ manifest, useSrc: true },
],
],
},
transform: {
react: {
pragma: 'VDOM.createElement',
},
},
},
},
}
cx@24.3.3
Features
Fixes
FAQs
Rewrite Cx imports for simplicity and optimal output size.
The npm package swc-plugin-transform-cx-imports receives a total of 118 weekly downloads. As such, swc-plugin-transform-cx-imports popularity was classified as not popular.
We found that swc-plugin-transform-cx-imports demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.