title: Cannot find module 'path'
body: <p>I'm attempting to learn Typescript and thought I should also make my webpack config in <code>.ts</code>. This is my <code>webpack.config.ts</code>:</p>
  
  <pre><code>import * as webpack from 'webpack';
  import * as path from 'path';
  
  const config: webpack.Configuration = {
      entry: path.resolve('src/main.ts'),
  
      module: {
          rules: [
              {
                  test: /\.tsx?$/,
                  use: 'ts-loader',
                  exclude: /node_modules/
              }
          ]
      },
  
      resolve: {
          extensions: ['.tsx', '.ts', '.js']
      },
  
      output: {
          filename: 'index.js',
          path: path.resolve( 'dist')
      }
  }
  
  export default config;
  </code></pre>
  
  <p>As well as my <code>package.json</code>:</p>
  
  <pre><code>  "main": "index.js",
    "scripts": {
      "prebuild": "rimraf dist",
      "build": "webpack --config devtools/webpack.config.ts --display-error-details",
      "post-build": "webpack-dev-server --config devtools/webpack.config.ts --mode development"
    },
    "author": "",
    "license": "ISC",
    "devDependencies": {
      "ts-loader": "^4.0.1",
      "ts-node": "^5.0.1",
      "typescript": "^2.7.2",
      "webpack": "^4.1.1",
      "webpack-cli": "^2.0.12",
      "webpack-dev-server": "^3.1.1"
    }
  }
  </code></pre>
  
  <p>The error I get when running npm run build is:</p>
  
  <pre><code>TS2307: Cannot find module 'path'
  </code></pre>
  
  <p>I have also tried requiring path, but then I get a different error saying it cant find module require.</p>
  
  <p>What seems to be the issue?</p>