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-kyt-core
Advanced tools
An opinionated Babel preset, best used with kyt. Check out the Options for how to extend polyfill your build targets.
This preset is used as a default if a kyt project does not include a .babelrc It is also included as part of babel-preset-kyt-react
To install:
npm install babel-preset-kyt-core --save
.babelrc.js
:
module.exports = {
presets: ['babel-preset-kyt-core'],
};
(see documentation for Babel preset options)
envOptions
(Object
) - extend the default babel-preset-env options. The type of options, client
, server
, and test
, are dependent on the value of process.env.KYT_ENV_TYPE
which, when undefined, defaults to client
. kyt will automatically set the KYT_ENV_TYPE
when it runs commands. For debugging purposes, use "debug": true
to see what the plugin is targeting. The following are the default babel-preset-env configurations used by kyt-core:
client
modules: false,
useBuiltIns: 'entry',
forceAllTransforms: true,
targets: {
browsers: ['>1%', 'last 4 versions', 'not ie < 11'],
},
server
modules: false,
useBuiltIns: 'entry',
forceAllTransforms: true,
targets: {
node: 'current'
},
These are sensible defaults that work well with kyt out of the box. The client
option, typically reserved for client builds in kyt, is used to target browsers, while the server
option targets the current version of node. The client.targets.browsers
configuration is in the browserslist format. The following is an example of how to override the option types in your babelrc configuration:
{
"presets": [
[
"babel-preset-kyt-core", {
"envOptions": {
"client": {
"debug": true,
"targets": {
"browsers": ["last 2 versions"]
}
},
"server": {
"debug": true,
"modules": true
},
},
},
],
],
}
You can find additional options to configure babel-preset-env here.
includeRuntime
(Boolean
) - whether or not to include babel-plugin-transform-runtime
; default: false
By default babel-preset-env
, an internal dependency, is configured to useBuiltIns
which means that you can install babel-polyfill
as a dependency in your project and import 'babel-polyfill'
at the top of your entry file (in a kyt project that would be src/client/index.js
and src/server/index.js
) to include an optimized polyfill for your build.
FAQs
An opinionated babel preset, best used with kyt
The npm package babel-preset-kyt-core receives a total of 6,773 weekly downloads. As such, babel-preset-kyt-core popularity was classified as popular.
We found that babel-preset-kyt-core demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 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.