feat(puppeteer): export esm modules in package.json (#7964)

* feat(puppeteer): export esm modules in package.json

Signed-off-by: Randolf Jung <jrandolf@chromium.org>

Co-authored-by: Alex Rudenko <OrKoN@users.noreply.github.com>
Co-authored-by: Randolf Jung <jrandolf@chromium.org>
This commit is contained in:
jrandolf
2022-02-09 08:47:27 +01:00
committed by GitHub
parent a858cf7021
commit 523b487e88
15 changed files with 108 additions and 14 deletions

View File

@@ -21,7 +21,9 @@ const path = require('path');
const packagePath = path.join(__dirname, '..', 'package.json');
const json = require(packagePath);
json.name = 'puppeteer-core';
delete json.scripts.install;
json.name = 'puppeteer-core';
json.main = './cjs-entry-core.js';
json.exports.import = './lib/esm/puppeteer/node-puppeteer-core.js';
fs.writeFileSync(packagePath, JSON.stringify(json, null, ' '));