Webpack.js.org: [Caching] The mysterious `./src/vendor.js` file

Created on 13 Feb 2017  路  7Comments  路  Source: webpack/webpack.js.org

The caching section starts right away with the mysterious ./src/vendor.js file yet there are no hints on what should be the contents of that file.
https://webpack.js.org/guides/caching/

Most helpful comment

I'm not appreciating your passive-aggressive way of writing. The documentation is an ongoing process. If you found an error, open an issue. If you want to have something changes, submit a PR.

Entry points are a key concept of webpack, which will not be spit out in detail on every page.

All 7 comments

I'll post some unclear lines here too.

module.exports = {
  /*...*/
  plugins: [
    /*...*/
    new webpack.optimize.CommonsChunkPlugin({
      name: ["vendor", "manifest"], // vendor libs + extracted manifest
      minChunks: Infinity,
    }),
    /*...*/
    new ChunkManifestPlugin({
      filename: "chunk-manifest.json",
      manifestVariable: "webpackManifest"
    })
  ]
};

Shouldn't the second "common chunk" be named "runtime" instead?
Since it no longer contains the "manifest" which is now in a separate variable.

Ok, I found what the ./src/vendor.js file should look like:
https://github.com/okonet/webpack-long-term-cache-demo/blob/master/src/vendor.js

Still it's very obscure and purposefully unrealistic: obviously no one would create such a file in their project (exporting a dummy string).
I'm gonna ask the author about what ./src/vendor.js is really meant to be.

@okonet ping

The vendor.js is covered in the concepts section of the docs: https://webpack.js.org/concepts/entry-points/#separate-app-and-vendor-entries

Ok.
While it still explains nothing about the mysterious vendor.js file I'm no longer researching this topic as I find it extremely possible that by the time you roll out the next release of a website some minor 3rd party deep-level dependency is gonna have a "patch" update, therefore I decided not to use this feature right now.

I'm not appreciating your passive-aggressive way of writing. The documentation is an ongoing process. If you found an error, open an issue. If you want to have something changes, submit a PR.

Entry points are a key concept of webpack, which will not be spit out in detail on every page.

I'm not appreciating your passive-aggressive way of writing.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AlexanderTserkovniy picture AlexanderTserkovniy  路  4Comments

marcofugaro picture marcofugaro  路  3Comments

catamphetamine picture catamphetamine  路  5Comments

dmackerman picture dmackerman  路  5Comments

anshumanv picture anshumanv  路  4Comments