title: How to use npm file in webpack version 4.42.0
body: <p>I started the use the web pack version 4.42.0, I can build the web-pack and able to run it. But whenever I include below code. I get an error, Please would anyone can help how to use npm fs in web-pack </p>
  
  <p>Index.js </p>
  
  <pre><code>var fs = require('fs');
  console.log(fs.readFileSync());
  </code></pre>
  
  <p>and my webpack-config.js </p>
  
  <pre><code>var HtmlWebpackPlugin = require('html-webpack-plugin');
  
  module.exports = {
     module: {
         rules: [
             {
                 test: /\.html$/i,
                 loader: 'html-loader',
                 options: { minimize: true }
             },
             {
                 test: /\.m?js$/,
                 exclude: /(node_modules|bower_components)/,
                 use: {
                     loader: 'babel-loader',
                     options: {
                         presets: ['@babel/preset-env']
                     }
                 }
             },
             {
                 test: /\.(png|jpe?g|gif)$/i,
                 use: [
                     {
                         loader: 'file-loader',
                     },
                 ],
             },
             {
                 test: /\.node$/,
                 use: 'node-loader'
             }
         ],
     },
     plugins: [new HtmlWebpackPlugin({
         template: "./src/index.html",
         filename: "./index.html"
     },
     )],
     mode: 'development',
     node: { fs: 'empty' },
     target: "node"
  };
  </code></pre>
  
  <p>I am facing the error</p>
  
  <blockquote>
    <p>Uncaught TypeError: fs.readFileSync is not a function</p>
  </blockquote>
  
  <p>After removing node and target from webpack-config.js</p>
  
  <blockquote>
    <p>ERROR in ./src/index.js
    Module not found: Error: Can't resolve 'fs' in '/Users/nagaraj/gowork/src/github.com/webpack_tutor/src'
     @ ./src/index.js 1:9-22</p>
  </blockquote>
  
  <pre><code>   package.json
  
     "devDependencies": {
      "@babel/core": "^7.8.7",
      "@babel/preset-env": "^7.8.7",
      "babel-loader": "^8.0.6",
      "file-loader": "^5.1.0",
      "html-loader": "^0.5.5",
      "html-webpack-plugin": "^3.2.0",
      "node-loader": "^0.6.0",
      "webpack": "^4.42.0",
      "webpack-cli": "^3.3.11"
    },
    "dependencies": {
      "fs": "0.0.1-security",
      "lodash-webpack-plugin": "^0.11.5",
      "webpack-dev-server": "^3.10.3"
    }
  </code></pre>