title: webpack ts-loader error : loaderContext.getOptions is not a function
body: <p>I'm trying to import my typescript file into <code>webpack</code>, when I run <code>tsc</code> in my terminal everything works fine, But when I  try to use compile my typescript code in <code>ts-loader</code> this weird error is shown :</p>
  <pre><code>ERROR in ./src/Main.ts
  Module build failed (from ./node_modules/ts-loader/index.js):
  TypeError: loaderContext.getOptions is not a function
      at getLoaderOptions (D:\Projects\Real\AviUI\node_modules\ts-loader\dist\index.js:91:41)
      at Object.loader (D:\Projects\Real\AviUI\node_modules\ts-loader\dist\index.js:14:21)
  </code></pre>
  <p>the webpack version : <code>4.43.0</code>, the ts-loader version : <code>^9.2.3</code> , the loader-utils version: <code>^1.4.0</code></p>
  <p>webpack.config.js file :</p>
  <pre class="lang-js prettyprint-override"><code>module.exports = {
      entry: path.resolve(__dirname, './src/main.ts'),
      module: {
          rules: [ 
          {
              test: /\.ts$/,
              include: [source_path],
              loader: 'ts-loader',
              exclude: /node_modules/, 
          }],
      },
      resolve: {
          extensions: ['.tsx', '.ts', '.js']
      },
      output: {
          filename: 'avi_ui.js',
          path: path.resolve(__dirname, 'dist')
      },
      externals: {
          'jquery': '`jquery`',
          'angular' : '`angular`'
      },
      mode: 'development'
  };
  </code></pre>
  <p>NOTE : I tried to update my <code>typescript</code> compiler to latest version(currently latest version is: 4.3.3) but it didn't work for me.</p>