@lightspeed/babel-preset-node

0.3.2 • Public • Published

@lightspeed/babel-preset-node

npm version

Introduction

Babel Node.js configuration and plugins in a convenient package.

Features

  • Transpile Node.js (and server-side React when used) TypeScript code to meet Lightspeed Node.js standards
  • 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-node
  1. Consume the Babel preset.
// babel.config.js
module.exports = {
  presets: ['@lightspeed/node'],
};
  1. Optionally, extend the configuration as you see fit.
// babel.config.js
module.exports = {
  presets: [
    [
      '@lightspeed/node',
      {
        'preset-env': {
          targets: {
            node: '8',
          },
        },
      },
    ],
  ],
};

Readme

Keywords

none

Package Sidebar

Install

npm i @lightspeed/babel-preset-node

Weekly Downloads

80

Version

0.3.2

License

MIT

Unpacked Size

5.49 kB

Total Files

6

Last publish

Collaborators

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