From 06170b67ba0a1c0af6dad68852d533c74b753b08 Mon Sep 17 00:00:00 2001 From: Steven Date: Fri, 3 May 2024 15:07:51 +0200 Subject: [PATCH] replace the last occurrence of jsnext:main (#8663) --- bin/update-package-json-for-publish.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/update-package-json-for-publish.js b/bin/update-package-json-for-publish.js index 1643b1b1be..af1a9d084e 100644 --- a/bin/update-package-json-for-publish.js +++ b/bin/update-package-json-for-publish.js @@ -5,7 +5,7 @@ // and update the version numbers to reflect the version from the top-level // dependencies list. Also throw an error if a dep is not declared top-level. // Also add necessary "browser" switches to each package.json, as well as -// other fields like "jsnext:main" and "files". +// other fields like "module" and "files". var fs = require('fs'); var path = require('path'); @@ -56,10 +56,10 @@ modules.forEach(function (mod) { './lib/index.es.js': './lib/index-browser.es.js', }; } - // Update "jsnext:main" to point to `lib/` rather than `src/`. + // Update "module" to point to `lib/` rather than `src/`. // `src/` is only used for building, not publishing. // Also add "module" member: https://github.com/rollup/rollup/wiki/pkg.module - pkg['jsnext:main'] = pkg.module = './lib/index.es.js'; + pkg.module = './lib/index.es.js'; // whitelist the files we'll actually publish pkg.files = ['lib', 'dist'];