Skip to content

Instantly share code, notes, and snippets.

@unlocomqx
Created December 3, 2017 11:21
Show Gist options
  • Save unlocomqx/3f15b803cdd732a02b2afbbfb8a70863 to your computer and use it in GitHub Desktop.
Save unlocomqx/3f15b803cdd732a02b2afbbfb8a70863 to your computer and use it in GitHub Desktop.
to be used with a run configuration
module: {
rules: [
{
test: /\.ts?$/,
loader: 'ts-loader',
exclude: /node_modules|tests/,
options: {
errorFormatter : function customErrorFormatter(error, colors) {
const messageColor = error.severity === 'warning' ? colors.bold.yellow : colors.bold.red;
const relative_path = path.relative(process.cwd(), error.file);
return messageColor(`@ ./${relative_path} ${error.line}:${error.character}-0`);
}
}
},
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment