Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
babel-preset-rax
Advanced tools
Babel preset for all Rax plugins.
This preset always includes the following plugins:
And with the development
option:
Using npm:
npm install --save-dev babel-preset-rax
or using yarn:
yarn add babel-preset-rax --dev
.babelrc
(Recommended).babelrc
Without options:
{
"presets": ["babel-preset-rax"]
}
With options:
{
"presets": [
[
"babel-preset-rax",
{
"pragma": "dom", // default pragma is createElement
"pragmaFrag": "DomFrag", // default is Fragment
"throwIfNamespace": false // defaults to true
}
]
]
}
babel --presets babel-preset-rax script.js
require("@babel/core").transform("code", {
presets: ["babel-preset-rax"],
});
pragma
string
, defaults to createElement
.
Replace the function used when compiling JSX expressions.
pragmaFrag
string
, defaults to Fragment
.
Replace the component used when compiling JSX fragments.
useBuiltIns
boolean
, defaults to false
.
Will use the native built-in instead of trying to polyfill behavior for any plugins that require one.
development
boolean
, defaults to false
.
Toggles plugins that aid in development, such as @babel/plugin-transform-react-jsx-self
and @babel/plugin-transform-react-jsx-source
.
This is useful when combined with the env option configuration or js config files.
throwIfNamespace
boolean
, defaults to true
.
Toggles whether or not to throw an error if a XML namespaced tag name is used. For example:
<f:image />
Though the JSX spec allows this, it is disabled by default since React's JSX does not currently have support for it.
module.exports = {
presets: [
[
"babel-preset-rax",
{
development: process.env.BABEL_ENV === "development",
},
],
],
};
Note: the
env
option will likely get deprecated soon
{
"presets": ["babel-preset-rax"],
"env": {
"development": {
"presets": [["babel-preset-rax", { "development": true }]]
}
}
}
FAQs
Babel preset for all Rax plugins.
The npm package babel-preset-rax receives a total of 294 weekly downloads. As such, babel-preset-rax popularity was classified as not popular.
We found that babel-preset-rax demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.