mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
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:
@@ -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, ' '));
|
||||
|
||||
Reference in New Issue
Block a user