Socket
Socket
Sign inDemoInstall

babel-preset-kupibilet

Package Overview
Dependencies
483
Maintainers
3
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    babel-preset-kupibilet

Babel preset for isomorphic apps from kupibilet-frontend


Version published
Weekly downloads
13
increased by333.33%
Maintainers
3
Install size
53.8 MB
Created
Weekly downloads
 

Readme

Source

babel-preset-kupibilet

Greenkeeper badge

Configurable preset that supports transforming JS both for client and server

Install

$ npm install --save-dev babel-preset-kupibilet

or

$ yarn add --dev babel-preset-kupibilet

Usage

.babelrc

{
  "presets": "babel-preset-kupibilet"
}

By default this preset takes into account three things from the environment:

  • INTL_ENV
  • NODE_ENV
  • TARGET_ENV

You can also set the config in explicit way:

const generateConfig = require('babel-preset-kupibilet/generateConfig')
const config = generateConfig({intl: true, env: 'development', target: 'node'})

generateConfig is a function that takes an options object with following settings:

  • intl (if present - adds react-intl plugin with 'extractedMessages' set as directory)
  • env ('production' or 'development')
  • target (must be set as 'browser' or 'node')

List of default presets:

  • 'react'
  • 'stage-1'

For browser there would be modules: false and ie11+ set as target environment

For node this preset has dynamic imports and does not include 'transform-async-to-generator' and 'transform-regenerator' options to make the bundle smaller, cause Node.js supports async/await natievly.

For development mode preset has plugins to display components stack and better JSX tracking for React warnings.

Keywords

FAQs

Last updated on 08 Dec 2021

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