diff --git a/.changeset/rare-bulldogs-battle.md b/.changeset/rare-bulldogs-battle.md new file mode 100644 index 00000000000..c7061ee01de --- /dev/null +++ b/.changeset/rare-bulldogs-battle.md @@ -0,0 +1,5 @@ +--- +"@smithy/core": minor +--- + +adds a module exports field in core diff --git a/packages/core/package.json b/packages/core/package.json index 3cd6a60a813..38136c74ca5 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -18,12 +18,14 @@ "types": "./dist-types/index.d.ts", "exports": { ".": { + "module": "./dist-es/index.js", "node": "./dist-cjs/index.js", "import": "./dist-es/index.js", "require": "./dist-cjs/index.js", "types": "./dist-types/index.d.ts" }, "./package.json": { + "module": "./package.json", "node": "./package.json", "import": "./package.json", "require": "./package.json" diff --git a/packages/core/scripts/lint.js b/packages/core/scripts/lint.js index 52157545cba..2a47a91921b 100644 --- a/packages/core/scripts/lint.js +++ b/packages/core/scripts/lint.js @@ -20,6 +20,7 @@ for (const submodule of submodules) { if (!pkgJson.exports[`./${submodule}`]) { errors.push(`${submodule} submodule is missing exports statement in package.json`); pkgJson.exports[`./${submodule}`] = { + module: `./dist-es/submodules/${submodule}/index.js`, node: `./dist-cjs/submodules/${submodule}/index.js`, import: `./dist-es/submodules/${submodule}/index.js`, require: `./dist-cjs/submodules/${submodule}/index.js`,