Skip to content

[codex] Fix package module entry#45

Open
luuhongyii wants to merge 1 commit into
Poimen:mainfrom
luuhongyii:codex/fix-module-entry
Open

[codex] Fix package module entry#45
luuhongyii wants to merge 1 commit into
Poimen:mainfrom
luuhongyii:codex/fix-module-entry

Conversation

@luuhongyii

Copy link
Copy Markdown

Summary

This fixes the package ESM entry in package.json.

The published package currently points module at dist/index.esm.js, but the package/build output contains dist/index.mjs instead. ESM consumers and tooling that prefer the module field can therefore resolve a file that is not present in the package.

Change

  • Update module from dist/index.esm.js to dist/index.mjs.

Validation

  • pnpm install --frozen-lockfile --ignore-scripts
  • pnpm build
  • npm pack --dry-run --json
  • node -e "const p=require('./package.json'); console.log(JSON.stringify({main:p.main,module:p.module}))"
  • git diff --check

I also ran pnpm test. It completed with 9/10 suites passing, 27/30 tests passing, and 33/36 snapshots passing. The remaining failures are three CSS snapshot diffs in src/test/global-style/global-style.test.ts showing output formatting/trailing-newline differences; I did not update snapshots because this PR only changes the package manifest entry.

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.

1 participant