A
A
antpv2018-08-03 19:47:34
JavaScript
antpv, 2018-08-03 19:47:34

What's the magic with webpack?

I assembled a test project, webpack generated main.js, I connect it to index.html, I go to index.html and the code does not work, I look at the console "n is not a function", I look at dist / main.js in my project starts So:

... !function(e){var n ={}; ...
, I look at the same dist/main.js only through the console and see:
... !function(e){var t ={}; ...
.
Is it legal at all?
Through the server:
5b64882684c89657949549.png
Inside the project:
5b64882fc1c18141739138.png
Maybe there is an option that this is the node-static server decided to make fun of it? I just don’t understand at what step and who specifically changes the names of the variables for me, when the code clearly says one thing, and when I look through the browser, it’s different.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton Bobylev, 2018-08-03
@dpigo

How is the cache configured? Disable it forcibly in devtools. Perhaps an earlier version of the minified script got into the cache.

P
profesor08, 2018-08-03
@profesor08

What devServer shows you is not the same as what you will have after the build.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question