aboutsummaryrefslogtreecommitdiff
path: root/webpack.config.js
diff options
context:
space:
mode:
authorTyler Schicke <tyler_schicke@brown.edu>2019-04-16 00:08:23 -0400
committerTyler Schicke <tyler_schicke@brown.edu>2019-04-16 00:08:23 -0400
commit5782ae7c2bcbdf0026387ba4ac1fcba273930c1c (patch)
tree5532ed3286a72dcc804b4e6c974f7b2fc688c3c3 /webpack.config.js
parent67015ac6e2bf46457570797c80bfc1c03203bd8b (diff)
Changed config stuff to make compilation faster
Fixed linter errors
Diffstat (limited to 'webpack.config.js')
-rw-r--r--webpack.config.js19
1 files changed, 9 insertions, 10 deletions
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,