Skip to content

Commit

Permalink
Docs: Fix typo Getting Started > Vite and Webpack guides (#37153)
Browse files Browse the repository at this point in the history
* 'were to look' → 'where to look'

Co-authored-by: Julien Déramond <juderamond@gmail.com>
  • Loading branch information
gabrielrbarbosa and julien-deramond committed Sep 14, 2022
1 parent 3bd5756 commit 9af1232
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion site/content/docs/5.2/getting-started/vite.md
Expand Up @@ -73,7 +73,7 @@ At this point, everything is in the right place, but Vite won't work because we

With dependencies installed and our project folder ready for us to start coding, we can now configure Vite and run our project locally.

1. **Open `vite.config.js` in your editor.** Since it's blank, we'll need to add some boilerplate config to it so we can start our server. This part of the config tells Vite were to look for our project's JavaScript and how the development server should behave (pulling from the `src` folder with hot reload).
1. **Open `vite.config.js` in your editor.** Since it's blank, we'll need to add some boilerplate config to it so we can start our server. This part of the config tells Vite where to look for our project's JavaScript and how the development server should behave (pulling from the `src` folder with hot reload).

<!-- eslint-skip -->
```js
Expand Down
2 changes: 1 addition & 1 deletion site/content/docs/5.2/getting-started/webpack.md
Expand Up @@ -75,7 +75,7 @@ At this point, everything is in the right place, but Webpack won't work because

With dependencies installed and our project folder ready for us to start coding, we can now configure Webpack and run our project locally.

1. **Open `webpack.config.js` in your editor.** Since it's blank, we'll need to add some boilerplate config to it so we can start our server. This part of the config tells Webpack were to look for our project's JavaScript, where to output the compiled code to (`dist`), and how the development server should behave (pulling from the `dist` folder with hot reload).
1. **Open `webpack.config.js` in your editor.** Since it's blank, we'll need to add some boilerplate config to it so we can start our server. This part of the config tells Webpack where to look for our project's JavaScript, where to output the compiled code to (`dist`), and how the development server should behave (pulling from the `dist` folder with hot reload).

```js
const path = require('path')
Expand Down

1 comment on commit 9af1232

@CRYPTO-GENIK
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Vite config section needs to be updated for the latest version of node and vite.

Add the below code in the 'vite.config.ts' or 'vite.config.js' file:

import { resolve } from 'path';

export default {
  root: resolve(__dirname, 'src'),
  resolve: {
    alias: {
      '~bootstrap': resolve(__dirname, 'node_modules/bootstrap'),
    }
  },
  server: {
    port: 8080,
    hot: true
  }
}

Please sign in to comment.