diff --git a/README.md b/README.md
index cd433535..e3efa858 100644
--- a/README.md
+++ b/README.md
@@ -553,7 +553,7 @@ The following table lists all the builds distributed with the `web-vitals` packa
- web-vitals.umd.js |
+ web-vitals.umd.cjs |
pgk.main |
A UMD version of the web-vitals.js bundle (exposed on the window.webVitals.* namespace).
@@ -574,7 +574,7 @@ The following table lists all the builds distributed with the `web-vitals` packa
|
- web-vitals.attribution.umd.js |
+ web-vitals.attribution.umd.cjs |
-- |
A UMD version of the web-vitals.attribution.js build (exposed on the window.webVitals.* namespace).
@@ -598,7 +598,7 @@ The following table lists all the builds distributed with the `web-vitals` packa
|
- web-vitals.base.umd.js |
+ web-vitals.base.umd.cjs |
-- |
This build has been deprecated.
@@ -619,7 +619,7 @@ The following table lists all the builds distributed with the `web-vitals` packa
| -- |
This build has been deprecated.
- The "polyfill" part of the "base+polyfill" version. This script should be used with either web-vitals.base.js , web-vitals.base.umd.js , or web-vitals.base.iife.js (it will not work with any script that doesn't have "base" in the filename).
+ The "polyfill" part of the "base+polyfill" version. This script should be used with either web-vitals.base.js , web-vitals.base.umd.cjs , or web-vitals.base.iife.js (it will not work with any script that doesn't have "base" in the filename).
See how to use the polyfill for more details.
|
diff --git a/package.json b/package.json
index 2ecdbf13..4c9029ca 100644
--- a/package.json
+++ b/package.json
@@ -4,32 +4,32 @@
"description": "Easily measure performance metrics in JavaScript",
"type": "module",
"typings": "dist/modules/index.d.ts",
- "main": "dist/web-vitals.umd.js",
+ "main": "dist/web-vitals.umd.cjs",
"module": "dist/web-vitals.js",
"exports": {
".": {
"types": "./dist/modules/index.d.ts",
- "require": "./dist/web-vitals.umd.js",
+ "require": "./dist/web-vitals.umd.cjs",
"default": "./dist/web-vitals.js"
},
"./base": {
"types": "./base.d.ts",
- "require": "./dist/web-vitals.base.umd.js",
+ "require": "./dist/web-vitals.base.umd.cjs",
"default": "./dist/web-vitals.base.js"
},
"./base.js": {
"types": "./base.d.ts",
- "require": "./dist/web-vitals.base.umd.js",
+ "require": "./dist/web-vitals.base.umd.cjs",
"default": "./dist/web-vitals.base.js"
},
"./attribution": {
"types": "./dist/modules/attribution.d.ts",
- "require": "./dist/web-vitals.attribution.umd.js",
+ "require": "./dist/web-vitals.attribution.umd.cjs",
"default": "./dist/web-vitals.attribution.js"
},
"./attribution.js": {
"types": "./dist/modules/attribution.d.ts",
- "require": "./dist/web-vitals.attribution.umd.js",
+ "require": "./dist/web-vitals.attribution.umd.cjs",
"default": "./dist/web-vitals.attribution.js"
},
"./onCLS.js": {
diff --git a/rollup.config.js b/rollup.config.js
index 7964a78a..087c6c80 100644
--- a/rollup.config.js
+++ b/rollup.config.js
@@ -53,7 +53,7 @@ const configs = [
input: 'dist/modules/index.js',
output: {
format: 'umd',
- file: `./dist/web-vitals.umd.js`,
+ file: `./dist/web-vitals.umd.cjs`,
name: 'webVitals',
},
plugins: configurePlugins({module: false, polyfill: false}),
@@ -79,7 +79,7 @@ const configs = [
input: 'dist/modules/index.js',
output: {
format: 'umd',
- file: `./dist/web-vitals.base.umd.js`,
+ file: `./dist/web-vitals.base.umd.cjs`,
name: 'webVitals',
extend: true,
},
@@ -117,7 +117,7 @@ const configs = [
input: 'dist/modules/attribution.js',
output: {
format: 'umd',
- file: `./dist/web-vitals.attribution.umd.js`,
+ file: `./dist/web-vitals.attribution.umd.cjs`,
name: 'webVitals',
},
plugins: configurePlugins({module: false, polyfill: false}),