Skip to content

chore: fix module metadata target#25

Merged
kryops merged 1 commit into
kryops:mainfrom
YfengJ:codex/fix-module-metadata
Jun 20, 2026
Merged

chore: fix module metadata target#25
kryops merged 1 commit into
kryops:mainfrom
YfengJ:codex/fix-module-metadata

Conversation

@YfengJ

@YfengJ YfengJ commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • update the package module field from ./dist/index.mjs to ./dist/index.js
  • keep it aligned with the existing ESM export target in exports.import

Why

The published rollup-plugin-gzip@4.2.0 package declares module: "./dist/index.mjs", but the npm tarball does not include dist/index.mjs. It does include dist/index.js, which is already the package's ESM target through exports.import and exports.default.

This keeps legacy bundlers/tools that still read the module field from resolving a missing file.

Validation

  • corepack yarn install --immutable
  • corepack yarn run test
  • corepack yarn run build
  • corepack yarn run lint after build
  • node -e "const fs=require('fs'); const pkg=require('./package.json'); const target=pkg.module.replace(/^\\.\\//,''); if(!fs.existsSync(target)){throw new Error('missing module target '+target)}; console.log(pkg.module+' exists')"
  • npm pack --dry-run --ignore-scripts --json .
  • git diff --check

@kryops kryops merged commit 675f39a into kryops:main Jun 20, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants