Miss any of our Open RFC calls?Watch the recordings here! »

babel-preset-jolt

2.8.9 • Public • Published

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,}]
  ]
}

Install

npm i babel-preset-jolt

DownloadsWeekly Downloads

4

Version

2.8.9

License

MIT

Unpacked Size

5.34 kB

Total Files

8

Last publish

Collaborators

  • avatar