title: Webpack: Error: Debug Failure. False expression
body: <p>I keep getting this error when trying to build in dev, and after adding a typescript file to the project.</p>
  
  <pre><code>Module build failed (from ./node_modules/ts-loader/index.js):
  Error: Debug Failure. False expression.
  </code></pre>
  
  <p>I have already tried <strong>npm i typescript</strong> but keep getting the same error.</p>
  
  <p><strong>package.json</strong></p>
  
  <pre><code>{
    "name": "webpack-demo",
    "version": "1.0.0",
    "license": "MIT",
    "scripts": {
      "build": "webpack -d"
    },
    "devDependencies": {},
    "dependencies": {
      "@types/node": "^10.5.1",
      "css-loader": "^0.28.11",
      "global": "^4.3.2",
      "node-sass": "^4.9.1",
      "sass-loader": "^7.0.3",
      "style-loader": "^0.21.0",
      "ts-loader": "^4.4.2",
      "typescript": "^2.9.2",
      "webpack": "^4.15.1",
      "webpack-cli": "^3.0.8"
    }
  }
  </code></pre>
  
  <p><strong>webpack.config.js</strong></p>
  
  <pre><code>const path = require('path');
  var webpack = require('webpack');
  module.exports = {
      entry: './src/index.ts',
       mode: 'production',
       module: {
               rules: [{
                   test: /\.tsx?$/,
                   use: 'ts-loader',
                   exclude: /node_modules/
               },
               {
                   test: /\.scss$/,
                   use: ['style-loader', 'css-loader', 'sass-loader'],
                   exclude: /node_modules/
               }
              ],
           },
      resolve: {
               extensions: ['.tsx', '.ts', '.js','.css','.scss']
           },
      output: {
          path: path.resolve(__dirname, 'dist'),
          filename: 'main.js'
      }
  }
  </code></pre>