@lightspeed/babel-preset-node
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
:
import { MyComponent } from 'src/components/MyComponent';
Quick Start
- Install the dependency in your webapp.
yarn add @babel/core @lightspeed/babel-preset-node
- Consume the Babel preset.
module.exports = {
presets: ['@lightspeed/node'],
};
- Optionally, extend the configuration as you see fit.
module.exports = {
presets: [
[
'@lightspeed/node',
{
'preset-env': {
targets: {
node: '8',
},
},
},
],
],
};