Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
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
{
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 browserlist 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.
0.3.0
- XX/XX/XXbabel-preset-env
, removes babel-preset-latest
0.2.0
- 03/23/17babel-plugin-syntax-dynamic-import
to allow parsing of dynamic import()
.FAQs
An opinionated babel preset, best used with kyt
The npm package babel-preset-kyt-core receives a total of 5,508 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.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.