Skip to content

Commit a3e2180

Browse files
committed
Use the cjs extension for all UMD builds
1 parent ab67c29 commit a3e2180

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ The following table lists all the builds distributed with the `web-vitals` packa
553553
</td>
554554
</tr>
555555
<tr>
556-
<td><code>web-vitals.umd.js</code></td>
556+
<td><code>web-vitals.umd.cjs</code></td>
557557
<td><code>pgk.main</code></td>
558558
<td>
559559
A UMD version of the <code>web-vitals.js</code> bundle (exposed on the <code>window.webVitals.*</code> namespace).
@@ -574,7 +574,7 @@ The following table lists all the builds distributed with the `web-vitals` packa
574574
</td>
575575
</tr>
576576
<tr>
577-
<td><code>web-vitals.attribution.umd.js</code></td>
577+
<td><code>web-vitals.attribution.umd.cjs</code></td>
578578
<td>--</td>
579579
<td>
580580
A UMD version of the <code>web-vitals.attribution.js</code> build (exposed on the <code>window.webVitals.*</code> namespace).
@@ -598,7 +598,7 @@ The following table lists all the builds distributed with the `web-vitals` packa
598598
</td>
599599
</tr>
600600
<tr>
601-
<td><code>web-vitals.base.umd.js</code></td>
601+
<td><code>web-vitals.base.umd.cjs</code></td>
602602
<td>--</td>
603603
<td>
604604
<p><strong>This build has been <a href="https://github.com/GoogleChrome/web-vitals/issues/238">deprecated</a>.</strong></p>
@@ -619,7 +619,7 @@ The following table lists all the builds distributed with the `web-vitals` packa
619619
<td>--</td>
620620
<td>
621621
<p><strong>This build has been <a href="https://github.com/GoogleChrome/web-vitals/issues/238">deprecated</a>.</strong></p>
622-
<p>The "polyfill" part of the "base+polyfill" version. This script should be used with either <code>web-vitals.base.js</code>, <code>web-vitals.base.umd.js</code>, or <code>web-vitals.base.iife.js</code> (it will not work with any script that doesn't have "base" in the filename).</p>
622+
<p>The "polyfill" part of the "base+polyfill" version. This script should be used with either <code>web-vitals.base.js</code>, <code>web-vitals.base.umd.cjs</code>, or <code>web-vitals.base.iife.js</code> (it will not work with any script that doesn't have "base" in the filename).</p>
623623
See <a href="#how-to-use-the-polyfill">how to use the polyfill</a> for more details.
624624
</td>
625625
</tr>

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,32 @@
44
"description": "Easily measure performance metrics in JavaScript",
55
"type": "module",
66
"typings": "dist/modules/index.d.ts",
7-
"main": "dist/web-vitals.umd.js",
7+
"main": "dist/web-vitals.umd.cjs",
88
"module": "dist/web-vitals.js",
99
"exports": {
1010
".": {
1111
"types": "./dist/modules/index.d.ts",
12-
"require": "./dist/web-vitals.umd.js",
12+
"require": "./dist/web-vitals.umd.cjs",
1313
"default": "./dist/web-vitals.js"
1414
},
1515
"./base": {
1616
"types": "./base.d.ts",
17-
"require": "./dist/web-vitals.base.umd.js",
17+
"require": "./dist/web-vitals.base.umd.cjs",
1818
"default": "./dist/web-vitals.base.js"
1919
},
2020
"./base.js": {
2121
"types": "./base.d.ts",
22-
"require": "./dist/web-vitals.base.umd.js",
22+
"require": "./dist/web-vitals.base.umd.cjs",
2323
"default": "./dist/web-vitals.base.js"
2424
},
2525
"./attribution": {
2626
"types": "./dist/modules/attribution.d.ts",
27-
"require": "./dist/web-vitals.attribution.umd.js",
27+
"require": "./dist/web-vitals.attribution.umd.cjs",
2828
"default": "./dist/web-vitals.attribution.js"
2929
},
3030
"./attribution.js": {
3131
"types": "./dist/modules/attribution.d.ts",
32-
"require": "./dist/web-vitals.attribution.umd.js",
32+
"require": "./dist/web-vitals.attribution.umd.cjs",
3333
"default": "./dist/web-vitals.attribution.js"
3434
},
3535
"./onCLS.js": {

rollup.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const configs = [
5353
input: 'dist/modules/index.js',
5454
output: {
5555
format: 'umd',
56-
file: `./dist/web-vitals.umd.js`,
56+
file: `./dist/web-vitals.umd.cjs`,
5757
name: 'webVitals',
5858
},
5959
plugins: configurePlugins({module: false, polyfill: false}),
@@ -79,7 +79,7 @@ const configs = [
7979
input: 'dist/modules/index.js',
8080
output: {
8181
format: 'umd',
82-
file: `./dist/web-vitals.base.umd.js`,
82+
file: `./dist/web-vitals.base.umd.cjs`,
8383
name: 'webVitals',
8484
extend: true,
8585
},
@@ -117,7 +117,7 @@ const configs = [
117117
input: 'dist/modules/attribution.js',
118118
output: {
119119
format: 'umd',
120-
file: `./dist/web-vitals.attribution.umd.js`,
120+
file: `./dist/web-vitals.attribution.umd.cjs`,
121121
name: 'webVitals',
122122
},
123123
plugins: configurePlugins({module: false, polyfill: false}),

0 commit comments

Comments
 (0)