diff --git a/javascript/organizing_your_javascript_code/webpack.md b/javascript/organizing_your_javascript_code/webpack.md index 062640ede0e..5dd767fdfaf 100644 --- a/javascript/organizing_your_javascript_code/webpack.md +++ b/javascript/organizing_your_javascript_code/webpack.md @@ -58,7 +58,7 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
1. Code along with [Webpack's "Asset Management" tutorial](https://webpack.js.org/guides/asset-management/) to learn how to use webpack to manage your website's assets. -1. This short article and video demonstrate [how to install `html-webpack-plugin` and set different options](https://rapidevelop.org/webpack/setup-html-webpack-plugin) on it (note that you do not need to include some of the options mentioned as they are already [`html-webpack-plugin`'s default settings](https://github.com/jantimon/html-webpack-plugin#options)). Whilst the written instructions do not show any code unlike the video, any options would be set just like the `template` option example shown above. +1. This short article and video demonstrate [how to install `html-webpack-plugin` and set different options](https://web.archive.org/web/20240520022915/https://rapidevelop.org/webpack/setup-html-webpack-plugin) on it (note that you do not need to include some of the options mentioned as they are already [`html-webpack-plugin`'s default settings](https://github.com/jantimon/html-webpack-plugin#options)). Whilst the written instructions do not show any code unlike the video, any options would be set just like the `template` option example shown above. 1. [Webpack's "Output Management" tutorial](https://webpack.js.org/guides/output-management/) also gives an example of using `html-webpack-plugin` but does not demonstrate using the template option. It also starts by demonstrating how to configure multiple entry points - you are unlikely to need this feature for the projects in this part of the course. 1. The first part of [Webpack's "Development" tutorial](https://webpack.js.org/guides/development/) (up until “Choosing a Development Tool”) talks about source maps, a handy way to track down which source file (index.js, a.js, b.js) an error is coming from when you use webpack to bundle them together. This is essential to debugging bundled code in your browser's DevTools. If the error comes from b.js the error will reference that file instead of the bundle. It also walks through an example of the `--watch` feature and `webpack-dev-server` package, either of which will prove invaluable when working with webpack. 1. If you use both `webpack-dev-server` and `html-webpack-plugin`, you will want to add your template HTML file to the [list of files watched for changes](https://webpack.js.org/configuration/dev-server/#devserverwatchfiles). This ensures that the server and page automatically reloads whenever you modify your template HTML file.