0.1.0 • Published 7 years ago
@lightspeed/web-configs v0.1.0
Introduction
A central repository of base tooling configurations, used to establish best practises around these tools at Lightspeed. These configurations can be extended as required on a per-project basis.
Getting started
- Install the dependency in your webapp.
yarn add @lightspeed/web-configConsuming and extending configuration
Babel
// babel.config.js
module.exports = {
presets: ['@lightspeed/web-config/babel'],
};Next.js
// next.config.js
module.exports = require('@lightspeed/web-config/next');Prettier
// prettier.config.js
module.exports = require('@lightspeed/web-configs/prettier');TypeScript
TypeScript does not support tsconfig.js files, so you'll need to use the extends field in the tsconfig.json file to point to a relative reference of this package's base tsconfig.json.
{
"extends": "./node_modules/@lightspeed/lightspeed-scripts/tsconfig"
}Note: In an app within a monorepo, you'll need to either reference the top-level node_modules directory, or add @lightspeed/web-config to your nohoist configuration.
0.1.0
7 years ago