@lightspeed/babel-preset-web

0.2.2 • Public • Published

@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'],
          },
        },
      },
    ],
  ],
};

Readme

Keywords

none

Package Sidebar

Install

npm i @lightspeed/babel-preset-web

Weekly Downloads

2

Version

0.2.2

License

MIT

Unpacked Size

5.07 kB

Total Files

5

Last publish

Collaborators

  • kurt.bergeron
  • lightspeedhq
  • ls-guillaume-lambert
  • ls-frederic-bouchard
  • anomen