Skip to content

Commit

Permalink
Webpack: Fix broken href (#28555)
Browse files Browse the repository at this point in the history
Domain expired recently so webarchive version required for now.
  • Loading branch information
abim91 authored Aug 2, 2024
1 parent 5a87275 commit b793a93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion javascript/organizing_your_javascript_code/webpack.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
<div class="lesson-content__panel" markdown="1">

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.
Expand Down

0 comments on commit b793a93

Please sign in to comment.