R
R
Rouslan9432020-03-02 03:47:03
JavaScript
Rouslan943, 2020-03-02 03:47:03

What is a webpack dev server?

I can't figure out what this thing is for.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Dobrin, 2020-03-02
@andreydobrin

With this thing you will be able to develop applications with high speed and comfort.
Webpack Dev Server allows you to run a local server (on your PC) and automatically check for changes to all files needed for development. That is, you do not have to restart the project to update the changes.
you write to the console:
npm i webpack-dev-server
in package.json , in the scripts field , add the following commands:

"scripts": {
    "commandName": "webpack-dev-server",
  }

Where is commandNamethe name of your team.
Simple config:
devServer: {
        port: 8888, // определяет порт 
        overlay: { // показывает ошибки или предупреждения при разработке
            warnings: boolean,
            errors: boolean
        },
        open: true, // открывает окно браузера
    }

and many more options like http/https/https2/hot/host/filename etc.

R
Robur, 2020-03-02
@Robur

And what exactly in the official description in the documentation is not clear to you? Or have you not read it yet, you decided to ask first?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question