What is @ angular / core / bundles / core.umd.js

I am trying to learn how angular decoders are declared. I found the file @angular/core/src/util/decorators.ts where the makeDecorator function is makeDecorator . I thought I could debug this file using a browser and provided the source maps. However, the browser does not download the @angular/core/src/util/decorators.js file, it downloads @angular/core/bundles/core.umd.js , which appears to include files from @angular/core/src , including @angular/core/src/util/decorators.js file.

So what is @angular/core/bundles/core.umd.js ? Is this a package of @angular/core/src files?

There is a file @ angular / core / tsconfig-build.json , which seems to be a build configuration file. It seems to have the same structure as the tsconfig.json file and is probably used by the typescript compiler.

+5
source share
1 answer

After reading some articles on the Internet, the best I came up with is umd in core.umd.js means a universal module definition. So core.umd.js is just the umd version of angular core.js.

Now you may ask, what is umd? As the name implies, this is a universal template for writing modules in javascript. This is done for developers to write code in a single consistent way.

For a more detailed explanation, please read -

+2
source

Source: https://habr.com/ru/post/1259518/


All Articles