> For the complete documentation index, see [llms.txt](https://javascriptuse.gitbook.io/advanced/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://javascriptuse.gitbook.io/advanced/webpack-9.-webpack-vendor-caching.md).

# \[WEBPACK] 9. Webpack : Vendor Caching

https\://www\.youtube.com/watch?v=vdmHdR-uqsE\&list=PLJ5qtRQovuEOqsMokakP9ue-y\_jXhmCwJ\&index=9

C:\Users\Administrator\Desktop\abc\webpack.config.js

```
const path = require('path');
const webpack = require('webpack');
const VENDOR_LIBS = [
  "redux",
  "redux-thunk"
];
module.exports = {
  entry: {
  	bundle: './src/app.js',
  	vendor: VENDOR_LIBS
  },
  output: {
    path: path.join(__dirname, 'public'),
    filename: '[name].js'
  },
  module: {
    rules: [{
        test: /\.js$/,
        exclude: /node_modules/,
        use: [{
          loader: 'babel-loader',
        }]
      },
      {
        test: /\.css$/,
        use: ['style-loader', 'css-loader']
      },
      {
        test: /.\jpe?g|\.gif|\.png|\.svg|\.woff|\.woff2|\.eot|\.ttf|\.waw|\.mp3|\.ico$/,
        loader: 'file-loader'
      }
    ]
  },
  devtool: 'cheap-module-eval-source-map',
  devServer: {
    contentBase: path.join(__dirname, 'public')
  },
  plugins: [
    new webpack.ProvidePlugin({
      '$': 'jquery',
      'jQuery': 'jquery',
      'window.$': 'jquery',
      'window.jQuery': 'jquery'
    })
  ]
};
```

{% file src="/files/-MIZveAtzttg-yBC2fzZ" %}
