New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@crystal-ball/babel-base

Package Overview
Dependencies
Maintainers
4
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@crystal-ball/babel-base

🔮 Projects - Babel configs

  • 4.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
17
decreased by-50%
Maintainers
4
Weekly downloads
 
Created
Source

babel base

Package version NPM downloads Build status Known vulnerabilities Test coverage Maintainability :status      
Renovate Commitizen friendly ZenHub Semantic Release Contributor Covenant :integrations
Contains magic Full of love :flair       


This package generates a base Babel configuration and dependencies for React applications and Node services. Users can customize the generated base configurations to meet the specific needs of any project.


⚙️ Setup

1. Install

npm i @crystal-ball/babel-base -DE
npm i @babel/runtime -E

2. Setup a Babel config

// babel.config.js
'use strict'

const { babelBase } = require('@crystal-ball/babel-base')

module.exports = function babelConfigs() {
  // Generate base Babel configs for your target project type
  const baseConfigs = babelBase({
    env: 'development|production|test',
    target: 'node|react',
  })

  /* Optionally override the base configs as needed... */

  return baseConfigs
}

React projects

1. Install packages

# Install polyfills included in application bundle
npm i core-js regenerator-runtime -E

# Install Linaria preset as a dev dependency
npm i @linaria/babel-preset react-refresh -DE

2. Import polyfills

// src/index.js
/**
 * Polyfill environments, these imports will be transformed to just the
 * polyfills needed to meet the browserslist targets by the `entry` config for
 * `@babel/preset-env`
 */
import 'core-js'
import 'regenerator-runtime/runtime'

Keywords

FAQs

Package last updated on 05 Jun 2021

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc