Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
@lite-v3/babel-preset
Advanced tools
A babel preset for tokopedia web services and packages
The standard preset for web services and packages in tokopedia environment.
$ npm install --save-dev @lite-v3/babel-preset
Or using Yarn
$ yarn add --dev @lite-v3/babel-preset
.babelrc
(Recommended).babelrc
{
"presets": ["@lite-v3/babel-preset"]
}
$ babel script.js --presets @lite-v3/babel-preset
require('@babel/core').transform('code', {
presets: ['@lite-v3/babel-preset'],
});
Enable transformation of ES module syntax to another module type. Setting this to false will preserve ES modules. Use this only if you intend to ship native ES Modules to browsers. If you are using a bundler with Babel, the default modules: "auto" is always preferred.
This option only has an effect when used alongside useBuiltIns: usage
or useBuiltIns: entry
, and ensures @babel/preset-env injects the polyfills supported by your core-js version. It is recommended to specify the minor version otherwise "3" will be interpreted as "3.0" which may not include polyfills for the latest features.
{
"presets": [
[
"@lite-v3/babel-preset",
{
"corejs": 3,
"useBuiltIns: "entry"
}
]
]
}
This module uses @babel/preset-env to target specific environments.
Please refer to @babel/preset-env#targets for a list of available options.
For a list of browsers please see browserlist.
You may override our default list of targets by providing your own targets
key.
{
"presets": [
[
"@lite-v3/babel-preset",
{
"targets": {
"chrome": 50,
"ie": 11,
"firefox": 45
}
}
]
]
}
The following transpiles only for Node v6.
{
"presets": [
[
"@lite-v3/babel-preset",
{
"targets": {
"node": 6
}
}
]
]
}
This option is useful for "blacklisting" a transform like @babel/plugin-transform-regenerator
if you don't use generators and don't want to include regeneratorRuntime (when using useBuiltIns) or for using another plugin like fast-async instead of Babel's async-to-gen.
{
"presets": [
[
"@lite-v3/babel-preset",
{
"exclude": ["es.promise", "es.promise.finally", "transform-typeof-symbol"]
}
]
]
}
This option will enable default babel plugins that will be compatible for web services. Set to true
if you are service author, otherwise the plugins are only intended for packages/pluggbales.
{
"presets": [
[
"@lite-v3/babel-preset",
{
"service": true
}
]
]
}
modern
option will allow you to build with presets that is intended only for modern browsers. This option requires service
to be true
. This is useful for differential serving.
style
option is only for babel-plugin-imports
especially for packages or services that using antd for its design system. Please refer to this link for more details about the option.
Provide presets and its corresponding plugins to support antd design system. Please refer to Receipts to how to use it, and presets and plugins to know more about which plugins/preset that be provided.
Provide presets and its corresponding plugins to support TypeScript. Please refer to Receipts to how to use it, and presets and plugins to know more about which plugins/preset that be provided.
Provide presets and its corresponding plugins to support React. Please refer to Receipts to how to use it, and presets and plugins to know more about which plugins/preset that be provided.
Provide presets and its corresponding plugins to support GraphQL. Please refer to Receipts to how to use it, and presets and plugins to know more about which plugins/preset that be provided.
You may be interested to log non-throwing-errors or warnings by setting debug
to true
.
{
"presets": [
[
"@lite-v3/babel-preset",
{
"debug": true
}
]
]
}
Toggles whether or not inlined Babel helpers (classCallCheck, extends, etc.) are replaced with calls to moduleName. The default is true
.
{
"presets": [
[
"@lite-v3/babel-preset",
{
"runtimeHelpers": false
}
]
]
}
Toggles whether or not generator functions are transformed to use a regenerator runtime that does not pollute the global scope. The default is true
.
{
"presets": [
[
"@lite-v3/babel-preset",
{
"runtimeRegenerator": false
}
]
]
}
Types | Presets |
---|---|
default | @babel/preset-env |
React | @babel/preset-react |
TyepScript | @babel/preset-typescript |
babel-plugin-macros
babel-plugin-lodash
babel-plugin-console
@babel/plugin-proposal-decorators
@babel/plugin-proposal-class-properties
@babel/plugin-proposal-private-methods
@babel/plugin-proposal-export-default-from
@babel/plugin-proposal-export-namespace-from
@babel/plugin-proposal-object-rest-spread
@babel/plugin-proposal-nullish-coalescing-operator
@babel/plugin-transform-runtime
@babel/plugin-transform-destructuring
@babel/plugin-syntax-dynamic-import
@babel/plugin-syntax-async-generators
babel-plugin-macros
babel-plugin-lodash
babel-plugin-console
@babel/plugin-proposal-numeric-separator
@babel/plugin-proposal-nullish-coalescing-operator
@babel/plugin-proposal-export-default-from
@babel/plugin-syntax-dynamic-import
@babel/plugin-transform-runtime
@loadable/babel-plugin
babel-plugin-emotion
react-hot-loader/babel
babel-plugin-transform-react-remove-prop-types
@babel/plugin-proposal-decorators
@babel/plugin-proposal-private-methods
@babel/plugin-proposal-class-properties
@babel/plugin-proposal-export-default-from
@babel/plugin-proposal-export-namespace-from
@babel/plugin-proposal-object-rest-spread
@babel/plugin-proposal-optional-chaining
@babel/plugin-proposal-nullish-coalescing-operator
@babel/plugin-syntax-async-generators
@babel/plugin-syntax-dynamic-import
@babel/plugin-transform-destructuring
@babel/plugin-transform-runtime
babel-plugin-lodash
babel-plugin-macros
babel-plugin-lodash
babel-plugin-console
@babel/plugin-proposal-decorators
@babel/plugin-proposal-class-properties
@babel/plugin-proposal-private-methods
@babel/plugin-proposal-export-default-from
@babel/plugin-proposal-export-namespace-from
@babel/plugin-proposal-object-rest-spread
@babel/plugin-proposal-nullish-coalescing-operator
@babel/plugin-proposal-optional-chaining
@babel/plugin-transform-runtime
@babel/plugin-transform-destructuring
@babel/plugin-syntax-dynamic-import
@babel/plugin-syntax-async-generators
babel-plugin-emotion
@babel/plugin-transform-react-constant-elements
@babel/plugin-transform-react-inline-elements
babel-plugin-transform-react-remove-prop-types
@loadable/babel-plugin
@babel/plugin-proposal-decorators
@babel/plugin-proposal-private-methods
@babel/plugin-proposal-class-properties
@babel/plugin-proposal-export-default-from
@babel/plugin-proposal-export-namespace-from
@babel/plugin-proposal-object-rest-spread
@babel/plugin-proposal-optional-chaining
@babel/plugin-proposal-nullish-coalescing-operator
@babel/plugin-syntax-async-generators
@babel/plugin-syntax-dynamic-import
@babel/plugin-transform-destructuring
@babel/plugin-transform-runtime
babel-plugin-lodash
.babelrc
{
"presets": [
[
"@lite-v3/babel-preset",
{
"service": true,
"useReact": true,
"useTypeScript": true,
}
]
]
}
.babelrc
{
"presets": [
[
"@lite-v3/babel-preset",
{
"service": true,
"useReact": true,
"useAntd": true,
}
]
]
}
.babelrc
{
"presets": [
[
"@lite-v3/babel-preset",
{
"modules": "commonjs",
}
]
]
}
FAQs
Babel preset for tokopedia web services
The npm package @lite-v3/babel-preset receives a total of 554 weekly downloads. As such, @lite-v3/babel-preset popularity was classified as not popular.
We found that @lite-v3/babel-preset 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.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.