1

I start learning webpack and reading survive.js book (http://survivejs.com/webpack_react/getting_started/) for this. But I can't understand one moment.

When I try build first example – I have one chunk more that in book. Books build log:

```> webpack
Hash: e02f97146a15a8a5c3a9
Version: webpack 1.8.4
Time: 44ms
    Asset     Size  Chunks             Chunk Names
bundle.js  1.74 kB       0  [emitted]  main
   [0] ./app/main.js 115 bytes {0} [built]
   [1] ./app/component.js 134 bytes {0} [built]```

My build log

```λ webpack --display-chunks --display-reasons
Hash: 0028e8ab537ae7e91068
Version: webpack 1.10.5
Time: 64ms
    Asset     Size  Chunks             Chunk Names
bundle.js  1.88 kB       0  [emitted]  main
chunk    {0} bundle.js (main) 323 bytes [rendered]
    [0] multi main 28 bytes {0} [built]
    [1] ./app/main.js 151 bytes {0} [built]
        single entry D:\Freelance\examples\react-learning\survivejs\app\main [0] multi main
    [2] ./app/component.js 144 bytes {0} [built]
        cjs require ./component [1] ./app/main.js 1:16-38
```

Can you help me to understand why I have [0] multi main 28 bytes {0} [built]? How I can remove this and have two modules in my final file?

Juho Vepsäläinen
  • 26,573
  • 12
  • 79
  • 105
Alexey Nikiforov
  • 357
  • 1
  • 4
  • 14

1 Answers1

1

Figured it out. I had some outdated print at the book. Yours is correct!

Given these tools move so fast it's easy to get outdated. The next edition will contain correct output.

Juho Vepsäläinen
  • 26,573
  • 12
  • 79
  • 105