Socket
Socket
Sign inDemoInstall

babel-preset-jolt

Package Overview
Dependencies
109
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    babel-preset-jolt

Default babel configuration for jolt packages.


Version published
Weekly downloads
31
increased by244.44%
Maintainers
1
Install size
7.06 MB
Created
Weekly downloads
 

Readme

Source

babel-preset-jolt

npm npm npm

Getting Started

Install babel-preset-jolt using yarn:

yarn add --dev babel-preset-jolt

Usage

In your .babelrc or package.json, add jolt as a preset:

"babel": {
  "presets": [
    "jolt"
  ]
}

target

By default, this will not target any environment. By passing the target option, you can specify if this is a node, react-native, or web package. This will enable the babel-preset-env, babel-preset-react-native, and both respectively.

"babel": {
  "presets": [
    ["jolt", {"target": "node"}]
  ]
}

import: {static}

Another option is to convert dynamic import() statements into static require() statements. This should be used when you do not want dynamic imports in one target (say, web), to affect another target (say, react-native).

"babel": {
  "presets": [
    ["jolt", {"reactNative": true, "useStaticImport": true,}]
  ]
}

Keywords

FAQs

Last updated on 25 Feb 2018

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc