const {resolve} = require('path');
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');

const tslintLoader = {loader: 'tslint-loader', options: {
  fix: true,
  emitErrors: true,
  // failOnHint: true,
}};

module.exports = {
  entry: './src',
  module: {
    rules: [
      {
        test: /\.tsx?/,
        use: tslintLoader,
        enforce: 'pre'
      },
      {
        test: /\.tsx?/,
        use: {
          loader: 'ts-loader',
          options: {
            transpileOnly: true
          }
        }
      },
      {
        test: /\.less$/,
        use: ['style-loader', 'css-loader', 'less-loader']
      },
      {
        test: /index.html$/,
        use: {
          loader: 'file-loader',
          options: {
            name: 'index.html'
          }
        }
      },
      { // Currently used to load shaders into javascript files
        test: /\.[fv]s$/,
        use: ['raw-loader'],
      },
    ],
  },
  resolve: {
    modules: ['./node_modules', './src'],
    extensions: ['.ts', '.tsx', '.js'],
  },
  output: {
    filename: 'app.js',
    path: resolve('build'),
    publicPath: '/',
  },
  plugins: [
    new ForkTsCheckerWebpackPlugin()
  ]
};

@@ -291,33 +291,24 @@
 s: %5B%0A      %7B
-%0A        
 test: /%5C.tsx
@@ -306,32 +306,24 @@
 t: /%5C.tsx?/,
-%0A       
  use: tslint
@@ -329,24 +329,16 @@
 tLoader,
-%0A       
  enforce
@@ -344,23 +344,16 @@
 e: 'pre'
-%0A      
 %7D,%0A     
@@ -350,33 +350,24 @@
 e'%7D,%0A      %7B
-%0A        
 test: /%5C.tsx
@@ -373,34 +373,15 @@
 x?/,
-%0A        use: %7B%0A          
+ use: %7B
 load
@@ -392,34 +392,24 @@
 'ts-loader',
-%0A         
  options: %7B%0A
@@ -407,29 +407,16 @@
 tions: %7B
-%0A            
 transpil
@@ -430,37 +430,10 @@
 true
-%0A          %7D%0A        %7D%0A      
+%7D%7D
 %7D,%0A 
@@ -434,33 +434,24 @@
 %7D%7D%7D,%0A      %7B
-%0A        
 test: /%5C.les
@@ -450,32 +450,24 @@
 : /%5C.less$/,
-%0A       
  use: %5B'styl
@@ -505,23 +505,16 @@
 loader'%5D
-%0A      
 %7D,%0A     
@@ -515,25 +515,16 @@
 %0A      %7B
-%0A        
 test: /i
@@ -539,34 +539,15 @@
 l$/,
-%0A        use: %7B%0A          
+ use: %7B
 load
@@ -564,26 +564,16 @@
 loader',
-%0A         
  options
@@ -579,21 +579,8 @@
 s: %7B
-%0A            
 name
@@ -597,47 +597,59 @@
 tml'
-%0A          %7D%0A        %7D%0A      %7D,%0A      %7B
+%7D%7D%7D,%0A      %7Btest: /%5C.%5Bfv%5Ds$/, use: %5B'raw-loader'%5D%7D,
  // 
@@ -705,72 +705,8 @@
 les%0A
-        test: /%5C.%5Bfv%5Ds$/,%0A        use: %5B'raw-loader'%5D,%0A      %7D,%0A
     

Clean ups