A
A
antanol2020-12-12 22:32:58
webpack
antanol, 2020-12-12 22:32:58

Why generated js in one line?

I started to study webpack by screencast from learnjs
I have a standard config:

var path = require('path');

module.exports = {
  entry: './src/scripts/main.js',
  output: {
    filename: 'bundle.js'
  }
};


There is a beautiful multi-line bundle.js in the video, but I have everything in one single line: Tell me
5fd51ab5ae11a874828863.png

how to set up the config so that there is a normal multi-line output :(

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
antanol, 2020-12-13
@antanol

I saw the pretty-print button in the console, thanks everyone
scale_1200

A
Alexander, 2020-12-12
@AleksandrB

First, why? This code is not made to be read, it is to be executed by the computer. This code is called minified, which reduces the file size.
Secondly, the video most likely used an extension for ide, which represents a one-line code in a code with indents and hyphens.
But you don't need it. This file does not need to be touched at all.

A
alex4answ, 2020-12-12
@alex4answ

In the same screencast there is an explanation of what sourceMap is and how to configure it

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question