UNPKG

lml-main

Version:

This is now a mono repository published into many standalone packages.

38 lines (35 loc) 1.16 kB
'use strict'; var ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin'); module.exports = { context: __dirname, // to automatically find tsconfig.json devtool: 'inline-source-map', entry: './src/index.ts', output: { filename: 'dist/index.js' }, module: { rules: [{ test: /\.tsx?$/, use: [ { loader: 'cache-loader' }, { loader: 'thread-loader', options: { // there should be 1 cpu for the fork-ts-checker-webpack-plugin workers: require('os').cpus().length - 1, }, }, { loader: 'ts-loader', options: { happyPackMode: true // IMPORTANT! use happyPackMode mode to speed-up compilation and reduce errors reported to webpack } } ] }] }, resolve: { extensions: ['.ts', '.tsx', 'js'] }, plugins: [ new ForkTsCheckerWebpackPlugin({ checkSyntacticErrors: true }) ] };