Skip to content

feat!: switch to named RspackChain export#88

Merged
chenjiahan merged 1 commit intomainfrom
chenjiahan/refactor-rspack-chain-named-export
Apr 2, 2026
Merged

feat!: switch to named RspackChain export#88
chenjiahan merged 1 commit intomainfrom
chenjiahan/refactor-rspack-chain-named-export

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

Summary

  • replace the package default export with a named RspackChain export so the runtime entry point and public types expose the same API shape
  • update the README examples plus runtime and type tests to use import { RspackChain } from 'rspack-chain'

Testing

  • pnpm test
  • pnpm test:types
  • pnpm build

Related Links

  • None

@chenjiahan chenjiahan changed the title refactor: switch to named RspackChain export feat!: switch to named RspackChain export Apr 2, 2026
@chenjiahan chenjiahan marked this pull request as ready for review April 2, 2026 02:45
Copilot AI review requested due to automatic review settings April 2, 2026 02:45
@chenjiahan chenjiahan merged commit 6b25ddc into main Apr 2, 2026
9 checks passed
@chenjiahan chenjiahan deleted the chenjiahan/refactor-rspack-chain-named-export branch April 2, 2026 02:47
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR changes the library’s public API surface to export the main chain class as a named RspackChain export (instead of a default export), aligning runtime and type entrypoints and updating examples/tests accordingly.

Changes:

  • Replace the default export with a named RspackChain export in the runtime entry (src/index.js).
  • Update TypeScript declaration entrypoint to export RspackChain (class + merged namespace) instead of a default export.
  • Update README, runtime tests, and type tests to use import { RspackChain } from 'rspack-chain'.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/index.js Renames main class to RspackChain and exports it as a named export.
types/index.d.ts Switches public types from default export Config to named RspackChain and updates nested types accordingly.
types/test/rspack-chain-tests.ts Updates type-level usage to RspackChain and adjusts related expectations.
test/Config.js Updates runtime tests to import/instantiate RspackChain and use RspackChain.toString.
README.md Updates documentation examples and headings from Config to RspackChain.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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