Bundle Names
An overview as to why we require bundle names, and the meanings for text we append to the defined bundle names.
What Are Bundle Names?
Bundle names are a requirement when configuring bundle analysis with your project, as we use them internally at Codecov to track the specific bundle overtime. This makes bundle analysis easy to integrate with monorepos, and packages when you build for multiple environments.
What do server
, client
, edge
mean?
server
, client
, edge
mean?Depending on the framework you're using you may end up building different outputs for different parts of your application. For example, NextJS when built outputs three different bundles; one for the server, edge, and client. We append these names to your defined bundle name because when you build an application you'll only (typically) execute the build command once, and everything will happen automatically for you under the hood. We append these output labels to your defined bundle name so we can track them easily and give you insights into different parts of your application.
What do esm
, cjs
, iife
, etc. mean?
esm
, cjs
, iife
, etc. mean?Depending on your setup, your bundler may output multiple versions of a package in different formats such as esm
, cjs
, etc. Your bundler does this with a single command execution so we automatically append this information to the bundle name during the build process. This allows us to easily track and inform you of the size of the different bundles, their specific format, and the differences between them.
Here's an overview of some of the names you may see appended to your defined bundle name, and their definition:
Bundler Config Format | Appended Text | Definition |
---|---|---|
amd | amd | Asynchronous Module Definition |
array-push | array-push | Web/Web worker |
cjs | cjs | CommonJS |
commonjs | cjs | CommonJS |
es | esm | ECMAScript module |
esm | esm | ECMAScript module |
module | esm | ECMAScript module |
iife | iife | Immediately-Invoked Function Expression |
umd | umd | Universal Module Definition |
system | system | Native format for SystemJS loader |
systemjs | system | Native format for SystemJS loader |
Updated 3 months ago