From 5782ae7c2bcbdf0026387ba4ac1fcba273930c1c Mon Sep 17 00:00:00 2001 From: Tyler Schicke Date: Tue, 16 Apr 2019 00:08:23 -0400 Subject: Changed config stuff to make compilation faster Fixed linter errors --- webpack.config.js | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'webpack.config.js') diff --git a/webpack.config.js b/webpack.config.js index 574401807..c08742272 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,6 +1,7 @@ var path = require('path'); var webpack = require('webpack'); const CopyWebpackPlugin = require("copy-webpack-plugin"); +const ForkTsCheckerWebpackPlugin = require("fork-ts-checker-webpack-plugin"); module.exports = { mode: 'development', @@ -11,6 +12,9 @@ module.exports = { inkControls: ["./src/mobile/InkControls.tsx", 'webpack-hot-middleware/client?reload=true'], imageUpload: ["./src/mobile/ImageUpload.tsx", 'webpack-hot-middleware/client?reload=true'], }, + optimization: { + noEmitOnErrors: true + }, devtool: "source-map", node: { fs: 'empty', @@ -30,17 +34,10 @@ module.exports = { module: { rules: [ { - test: [/\.tsx?$/, /\.ts?$/,], - enforce: 'pre', + test: [/\.tsx?$/], use: [ - { - loader: "tslint-loader", - } + { loader: 'ts-loader', options: { transpileOnly: true } } ] - }, { - test: [/\.tsx?$/, /\.ts?$/,], - loader: "awesome-typescript-loader", - include: path.join(__dirname, 'src') }, { test: /\.scss|css$/, @@ -78,9 +75,11 @@ module.exports = { }, plugins: [ new CopyWebpackPlugin([{ from: "deploy", to: path.join(__dirname, "build") }]), + new ForkTsCheckerWebpackPlugin({ + tslint: true, useTypescriptIncrementalApi: true + }), new webpack.optimize.OccurrenceOrderPlugin(), new webpack.HotModuleReplacementPlugin(), - new webpack.NoEmitOnErrorsPlugin() ], devServer: { compress: false, -- cgit v1.2.3-70-g09d2