@becklyn/typescript-error-formatter
v1.0.4
Published
Error formatter for typescript errors
Downloads
8,649
Maintainers
Keywords
Readme
TypeScript Error Formatter
Installation
yarn add -D @becklyn/typescript-error-formatter
Usage
Add the formatter in your ts-loader
config:
const formatter = require("@becklyn/typescript-error-formatter");
const config = {
module: {
rules: [
{
test: /\.tsx?$/,
use: [
babelLoader,
{
loader: "ts-loader",
options: {
// ↓ ↓ ↓
errorFormatter: (message, colors) => formatter(message, colors, process.cwd()),
// ↑ ↑ ↑
},
},
],
},
],
},
};
Design
The design is inspired by Flow: