diff --git a/packages/browsers/package.json b/packages/browsers/package.json index be95b2e4..2aa4ecd8 100644 --- a/packages/browsers/package.json +++ b/packages/browsers/package.json @@ -11,6 +11,13 @@ "bin": { "@puppeteer/browsers": "lib/cjs/browsers.js" }, + "main": "./lib/cjs/main.js", + "exports": { + ".": { + "import": "./lib/esm/main.js", + "require": "./lib/cjs/main.js" + } + }, "wireit": { "build": { "command": "tsc -b && chmod a+x lib/cjs/browsers.js lib/esm/browsers.js", diff --git a/packages/browsers/test/src/fetch.spec.ts b/packages/browsers/test/src/fetch.spec.ts index 248620a1..38beeb8a 100644 --- a/packages/browsers/test/src/fetch.spec.ts +++ b/packages/browsers/test/src/fetch.spec.ts @@ -21,8 +21,7 @@ import https from 'https'; import os from 'os'; import path from 'path'; -import {Browser, BrowserPlatform} from '../../lib/cjs/browsers/browsers.js'; -import {fetch, canFetch} from '../../lib/cjs/fetch.js'; +import {fetch, canFetch, Browser, BrowserPlatform} from '../../lib/cjs/main.js'; import {testChromeBuildId, testFirefoxBuildId} from './versions.js'; diff --git a/packages/browsers/test/src/launcher.spec.ts b/packages/browsers/test/src/launcher.spec.ts index d2f967eb..729258ac 100644 --- a/packages/browsers/test/src/launcher.spec.ts +++ b/packages/browsers/test/src/launcher.spec.ts @@ -19,13 +19,14 @@ import fs from 'fs'; import os from 'os'; import path from 'path'; -import {Browser, BrowserPlatform} from '../../lib/cjs/browsers/browsers.js'; -import {fetch} from '../../lib/cjs/fetch.js'; import { CDP_WEBSOCKET_ENDPOINT_REGEX, computeExecutablePath, launch, -} from '../../lib/cjs/launcher.js'; + fetch, + Browser, + BrowserPlatform, +} from '../../lib/cjs/main.js'; import {testChromeBuildId, testFirefoxBuildId} from './versions.js';