title: How to ignore typescript errors when compile by webpack production mode
body: <h1>environment</h1>
  
  <p>webpack 4.41.2</p>
  
  <p>typescript 3.7.2</p>
  
  <h1>problem</h1>
  
  <p>When I compile files by webpack development mode, there is no problem.
  But when I compile by production mode, there is a lot of errors and I can't compile.</p>
  
  <h1>destination</h1>
  
  <p>find the way how to ignore typescript errors when webpack compiles by production mode</p>
  
  <h1>code</h1>
  
  <p>▼webpack.config.js (js part)</p>
  
  <pre><code>{
      mode: "development",
      entry: "./src/index.tsx",
      output: {
          path: `${__dirname}/dist`,
          filename: "index.js"
      },
      module: {
          rules: [
              {
                  test: /\.tsx?$/,
                  use: "ts-loader"
              },
              {
                  test: /\.svg$/,
                  loader: "react-svg-loader",
                  options: {
                      svgo: {
                          plugins: [
                              { removeTitle: false }
                          ],
                          floatPrecision: 2
                      }
                  }
              },
              {
                  test: /\.(vert|frag|glsl)$/,
                  use: {
                      loader: 'webpack-glsl-loader'
                  }
              }
          ]
      },
      resolve: {
          extensions: [".ts", ".tsx", ".js", ".json"]
      },
  },
  </code></pre>
  
  <p>▼ tsconfig</p>
  
  <pre><code>{
    "compilerOptions": {
      "sourceMap": false,
      "target": "es5",
      "module": "es2015",
      "jsx": "react",
      "moduleResolution": "node",
      "lib": [
        "es2019",
        "dom"
      ],
      "removeComments": true,
      "noUnusedLocals": false
    }
  }
  </code></pre>
  
  <h2>error content</h2>
  
  <pre><code>ERROR in /var/www/hoge/src/index.tsx
  [tsl] ERROR in /var/www/hoge/src/index.tsx(56,33)
        TS2322: Type '(page: any) =&gt; void' is not assignable to type 'void'.
  
  ERROR in /var/www/hoge/src/about/index.tsx
  [tsl] ERROR in /var/www/hoge/src/about/index.tsx(15,48)
        TS2339: Property 'appRef' does not exist on type 'About'.
  
  ERROR in /var/www/hoge/src/gallery/index.tsx
  [tsl] ERROR in /var/www/hoge/src/gallery/index.tsx(8,27)
        TS2307: Cannot find module './picturesData'.
  
  ERROR in /var/www/hoge/src/gallery/index.tsx
  [tsl] ERROR in /var/www/hoge/src/gallery/index.tsx(9,9)
        TS2529: Duplicate identifier 'Promise'. Compiler reserves name 'Promise' in top level scope of a module containing async functions.
  
  ...and other almost similar 40 errors
  </code></pre>
  
  <h1>What I've tried so far</h1>
  
  <p>・check similer post in Internet like these
  <a href="https://stackoverflow.com/questions/43852966/ignore-typescript-errors-in-webpack-dev-server">Ignore Typescript errors in Webpack-dev-server</a>
  <a href="https://stackoverflow.com/questions/51433442/how-to-ignore-typescript-errors-with-webpack">How to ignore typescript errors with webpack?</a>
  but it doesn't help me</p>
  
  <p>・add this code to tsconfig.js</p>
  
  <pre><code>"no-consecutive-blank-lines": false,
  "no-unused-variable": false,
  </code></pre>
  
  <p>but error "Unknown compiler option"</p>