Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
@foxford/babel-preset-react-app
Advanced tools
Forked from babel-preset-react-app v10.0.0
First, install Babel.
Then install @foxford/babel-preset-react-app.
pnpm add @foxford/babel-preset-react-app --save-dev
Then create a file named .babelrc
with following contents in the root folder of your project:
{
"presets": ["@foxford/babel-preset-react-app"]
}
This preset uses the useBuiltIns
option with transform-object-rest-spread and transform-react-jsx, which assumes that Object.assign
is available or polyfilled.
Make sure you have a .flowconfig
file at the root directory. You can also use the flow
option on .babelrc
:
{
"presets": [["@foxford/babel-preset-react-app", { "flow": true, "typescript": false }]]
}
Make sure you have a tsconfig.json
file at the root directory. You can also use the typescript
option on .babelrc
:
{
"presets": [["@foxford/babel-preset-react-app", { "flow": false, "typescript": true }]]
}
Absolute paths are enabled by default for imports. To use relative paths instead, set the absoluteRuntime
option in .babelrc
to false
:
{
"presets": [["@foxford/babel-preset-react-app", { "absoluteRuntime": false }]]
}
type PresetOptions {
absoluteRuntime: boolean,
flow: boolean,
typescript: boolean,
debug: boolean,
envUseBuiltIns: 'entry' | 'usage',
targets: {}, // preset-env targets
mjs: boolean, // esmodules targets for preset-env
useESModules: boolean, // https://babeljs.io/docs/en/babel-plugin-transform-runtime#useesmodules
runtime: 'classic' | 'automatic' // use new jsx transform
}
"@babel/plugin-proposal-class-properties"
"@babel/plugin-proposal-decorators"
"@babel/plugin-proposal-nullish-coalescing-operator"
"@babel/plugin-proposal-numeric-separator"
"@babel/plugin-proposal-optional-chaining"
"@babel/plugin-transform-flow-strip-types"
"@babel/plugin-transform-react-display-name"
"@babel/plugin-proposal-export-default-from"
"@babel/plugin-transform-runtime"
FAQs
Preset babel for foxford js apps
We found that @foxford/babel-preset-react-app demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.