Skip to content

Commit

Permalink
replace the last occurrence of jsnext:main (#8663)
Browse files Browse the repository at this point in the history
  • Loading branch information
SourceR85 committed May 3, 2024
1 parent 1cfbadc commit 06170b6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/update-package-json-for-publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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'];

Expand Down

0 comments on commit 06170b6

Please sign in to comment.