0

I'm using angular cli v1.0.0-beta.21 and using ng -b -prod -aot I'm getting the expected

  • index.html
  • style.bundle.css
  • main.bundle.js

There some files which I don't know what they are for and was hoping you could enlighten me!

  • inline.bundle.js
  • style.bundle.js
  • a lot of .map files
  • main.bundle.js.gz

In particular I'd like to know if I need those .map files, since they are really bid (main.bundle.map is like 3.3MB)

Thanks!

Han Che
  • 8,239
  • 19
  • 70
  • 116

2 Answers2

1

You do not need the map files.

The gz files are optional. They are actually preferable if your web server is configured to support them.

The inline.bundle is the module loader. The styles.bundle.js is your compiled component styles. These are in a js file because they are added to the dom with dynamic namespaces for CSS encapsulation.

In summary all of these files are needed except the map and gz files. It is a good idea to use the gz files if your http server is configured to use them.

Martin
  • 15,820
  • 4
  • 47
  • 56
0

These .map file map between the emitted Javascript and the Typescript source, making debugging much, much easier.

If you load a page without opening dev tools, There is no http request for these map file. That will no affect page's performance.

Albert
  • 94
  • 7