Skip to content

feat(cli): add exports field#8119

Merged
chenjiahan merged 2 commits intomainfrom
rslib_rspack_cli_1015
Oct 15, 2024
Merged

feat(cli): add exports field#8119
chenjiahan merged 2 commits intomainfrom
rslib_rspack_cli_1015

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

@chenjiahan chenjiahan commented Oct 15, 2024

Summary

  • Add exports field to the @rspack/cli package, align with @rspack/core and @rspack/dev-server.
  • Use sort-package-json to sort the package.json file.

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@github-actions github-actions bot added the release: feature release: feature related release(mr only) label Oct 15, 2024
@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label Oct 15, 2024
@netlify
Copy link
Copy Markdown

netlify bot commented Oct 15, 2024

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit 8abae17
🔍 Latest deploy log https://app.netlify.com/sites/rspack/deploys/670e07d2cb58510008dbe2d7

@hardfist
Copy link
Copy Markdown
Contributor

what will consume @rspack/cli js API?

@chenjiahan chenjiahan changed the title feat(CLI): add exports field feat(cli): add exports field Oct 15, 2024
@chenjiahan
Copy link
Copy Markdown
Member Author

@hardfist Only a few public API, such as defineConfig and definePlugin:

// rspack.config.ts
import { defineConfig } from '@rspack/cli';

I add the exports field to prevent the internal modules of @rspack/cli from being mistakenly consumed by users.

@chenjiahan chenjiahan requested a review from hardfist October 15, 2024 05:06
@chenjiahan chenjiahan merged commit 0d01456 into main Oct 15, 2024
@chenjiahan chenjiahan deleted the rslib_rspack_cli_1015 branch October 15, 2024 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: feature release: feature related release(mr only) team The issue/pr is created by the member of Rspack.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants