webpack.js.org icon indicating copy to clipboard operation
webpack.js.org copied to clipboard

Update lazy-loading.md

Open LuisRodNuezDev opened this issue 4 years ago • 3 comments
trafficstars

I had to add the CleanWebpackPlugin and the HtmlWebpackPlugin in the webpack.config.js file in order to get the same results that were shown in the example after the npm run build command was ran. These two plugins were not present in the Code Splitting subsection of the Guides section.

describe your changes...

  • [x] Read and sign the CLA. PRs that haven't signed it won't be accepted.
  • [x] Make sure your PR complies with the writer's guide.
  • [x] Review the diff carefully as sometimes this can reveal issues.
  • [x] Do not abandon your Pull Request: Stale Pull Requests.
  • Remove these instructions from your PR as they are for your eyes only.

LuisRodNuezDev avatar Dec 31 '20 03:12 LuisRodNuezDev

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/webpack-docs/webpack-js-org/9c0mcdkxb
✅ Preview: https://webpack-js-org-git-fork-tazexprez-patch-1.webpack-docs.vercel.app

vercel[bot] avatar Dec 31 '20 03:12 vercel[bot]

I think the situation here is a little complex. That Lazy Loading guide was based on Code Splitting guide which was based on others, and those plugins are presented over there. Which means you have to finish other guides before Lazy Loading, otherwise you might get a problem.

I have a plan to refactor the guides so they're not deeply coupled. Hope it can save us from those problems in future.

chenxsan avatar Dec 31 '20 04:12 chenxsan

Thank you for your help. I will keep this in mind when going through other guides in the future.

LuisRodNuezDev avatar Dec 31 '20 04:12 LuisRodNuezDev