Skip to content

Commit

Permalink
Webpack: Make bash formatting in install statements consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
softy-dev committed Oct 12, 2024
1 parent cc73262 commit e47104d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion javascript/organizing_your_javascript_code/webpack.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,13 @@ There are three different ways you could be dealing with local image files:

1. **Image files we reference in our HTML template, e.g. as the `src` of an `<img>`**

We need to install and tell Webpack to use something called `html-loader`, which will detect image file paths in our HTML template and load the right image files for us. Without this, `./odin.png` would just be a bit of text that will no longer reference the correct file once we run Webpack to build into `dist`. We can install it with `npm install --save-dev html-loader`, then add the following object to the `modules.rules` array within `webpack.config.js`:
We need to install and tell Webpack to use something called `html-loader`, which will detect image file paths in our HTML template and load the right image files for us. Without this, `./odin.png` would just be a bit of text that will no longer reference the correct file once we run Webpack to build into `dist`. Let's install it:

Check failure on line 263 in javascript/organizing_your_javascript_code/webpack.md

View workflow job for this annotation

GitHub Actions / Lint lesson files

Trailing spaces

javascript/organizing_your_javascript_code/webpack.md:263:1 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 3] https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md009.md
```bash
npm install --save-dev html-loader
```

Check failure on line 267 in javascript/organizing_your_javascript_code/webpack.md

View workflow job for this annotation

GitHub Actions / Lint lesson files

Trailing spaces

javascript/organizing_your_javascript_code/webpack.md:267:1 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 3] https://github.com/DavidAnson/markdownlint/blob/v0.32.1/doc/md009.md
Then add the following object to the `modules.rules` array within `webpack.config.js`:

```javascript
{
Expand Down

0 comments on commit e47104d

Please sign in to comment.