Webpack.js.org: Better distinction between v4 and v5 docs

Created on 26 May 2020  Â·  4Comments  Â·  Source: webpack/webpack.js.org

I'm opening this because I've seen fragments of this request dotted around other issues, but I couldn't find a single issue that tied them together.

The current setup of the docs site is confusing and causing frustration. It looks like the main site now contains documentation for v5, which is still only in beta right now. The only indication that the docs are for the new beta version are small notes in the left column.

  • The version number at the top of the column vanishes from view as soon as the page is scrolled even a small amount.
  • The small note at the bottom of the column is likewise hidden when the column content is large:
    image

I just got hit by the exact same problem as https://github.com/webpack/webpack/issues/10716 — I went looking for a config option, tried it out, then hit a compilation failure because it turned out to be a v5-only option.

Rather than just complaining, I have some suggestions:

  1. Default the webpack.js.org site to v4 docs until v5.0.0 is actually released, with v5 docs as the alternative site (so the inverse of what's currently set up). Running npm install webpack still installs version 4 at the moment, so that's what a huge majority of people are going to want documentation for. It's really confusing to have the installation and docs be out of sync like this.
  2. On the v5 site, have a more prominent note that it's v5 with links to older docs (e.g. #2980).
  3. Once v5 is released, the v4 site needs a prominent notice that it's not the latest version (noted in #3366).

Most helpful comment

@EugeneHlushko Thanks for the response. But I feel you've just repeated my opening problem statement. Maybe I didn't list the problem clearly enough:

  • Webpack v5 may be the "recommended version", but it's important to note that it hasn't been released yet — beta versions don't count as v5 being released. There are many, many teams out there who will refuse to use a beta version of a tool for a production system. Therefore the primary docs site should still be for v4.
  • The installation guide in the current v5 docs gives instructions to install a version of webpack that is not the same as the docs. Note the "latest webpack release" badge:
    image
  • The badge showing the current version is very easy to miss. This can be shown by opening any deep link to a specific piece of config, which scrolls the badge out of sight: https://webpack.js.org/configuration/output/#outputlibrary

All 4 comments

How about adding a version badge indicating which version of webpack has introduced that option?

For example:

image

Hi @gilmoreorless
Current live website is for webpack 5 which is the recommended version for the projects due to numerous improvements. The shield that has a beta on it, indeed does indicate the latest version of webpack that docs cover

@EugeneHlushko Thanks for the response. But I feel you've just repeated my opening problem statement. Maybe I didn't list the problem clearly enough:

  • Webpack v5 may be the "recommended version", but it's important to note that it hasn't been released yet — beta versions don't count as v5 being released. There are many, many teams out there who will refuse to use a beta version of a tool for a production system. Therefore the primary docs site should still be for v4.
  • The installation guide in the current v5 docs gives instructions to install a version of webpack that is not the same as the docs. Note the "latest webpack release" badge:
    image
  • The badge showing the current version is very easy to miss. This can be shown by opening any deep link to a specific piece of config, which scrolls the badge out of sight: https://webpack.js.org/configuration/output/#outputlibrary

Closing this since v5 has been released.

Was this page helpful?
0 / 5 - 0 ratings