Socket
Socket
Sign inDemoInstall

@lightspeed/babel-preset-web

Package Overview
Dependencies
200
Maintainers
10
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @lightspeed/babel-preset-web

Common Babel configuration for Lightspeed webapps


Version published
Weekly downloads
0
decreased by-100%
Maintainers
10
Created
Weekly downloads
 

Readme

Source

@lightspeed/babel-preset-web

npm version

Introduction

Babel web configuration and plugins in a convenient package.

Features

  • ✨ Transpile React TypeScript code to meet Lightspeed browser requirements
  • ➡ Absolute path resolving for root src:
// From anywhere in your app, this will resolve to `<root>/src/components/MyComponent.(js,ts,jsx,tsx)
import { MyComponent } from 'src/components/MyComponent';

Quick Start

  1. Install the dependency in your webapp.
yarn add @babel/core @lightspeed/babel-preset-web
  1. Consume the Babel preset.
// babel.config.js
module.exports = {
  presets: ['@lightspeed/web'],
};
  1. Optionally, extend the configuration as you see fit.
// babel.config.js
module.exports = {
  presets: [
    [
      '@lightspeed/web',
      {
        'preset-env': {
          targets: {
            browsers: ['>0.25%', 'not op_mini all', 'ie <= 11', 'not dead'],
          },
        },
      },
    ],
  ],
};

FAQs

Last updated on 11 Jul 2019

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