Skip to content

Comments

fix(node/exports): export ./plugins in publishConfig for rolldown#6926

Merged
shulaoda merged 2 commits intomainfrom
copilot/fix-plugins-export-issue
Nov 10, 2025
Merged

fix(node/exports): export ./plugins in publishConfig for rolldown#6926
shulaoda merged 2 commits intomainfrom
copilot/fix-plugins-export-issue

Conversation

Copy link
Contributor

Copilot AI commented Nov 10, 2025

The ./plugins export path is missing from publishConfig.exports, causing imports to fail in published packages while working in development.

Changes

  • Added "./plugins": "./dist/plugins-index.mjs" to publishConfig.exports in packages/rolldown/package.json

Context

The development exports field includes the ./plugins path, but publishConfig.exports overrides this during publishing. This discrepancy breaks the following import in beta.48:

import { replacePlugin } from 'rolldown/plugins';
// Error: Package path ./plugins is not exported from package

The fix ensures both development and published packages expose the same export paths.

Original prompt

This section details on the original issue you should resolve

<issue_title>[Bug]: Plugins is not exported in beta.48</issue_title>
<issue_description>### Reproduction link or steps

"./plugins": "./dist/plugins-index.mjs" is missing from package.json, cannot import replacePlugin from rolldown/plugins

What is expected?

Import OK

What is actually happening?

Package path ./plugins is not exported from package

System Info

"rolldown": "1.0.0-beta.48"

Any additional comments?

I'm using pnpm pkg manager</issue_description>

Comments on the Issue (you are @copilot in this section)

@hyf0 Weird. I saw

"./plugins": {
"dev": "./src/plugins-index.ts",
"default": "./dist/plugins-index.mjs"

export { esmExternalRequirePlugin } from './builtin-plugin/constructors';
export { replacePlugin } from './builtin-plugin/replace-plugin';

exist.</comment_new>
<comment_new>@hyf0
What a footgun :)</comment_new>


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 10, 2025

How to use the Graphite Merge Queue

Add the label graphite: merge to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@netlify
Copy link

netlify bot commented Nov 10, 2025

Deploy Preview for rolldown-rs ready!

Name Link
🔨 Latest commit 152538b
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/691249c805266200086766e4
😎 Deploy Preview https://deploy-preview-6926--rolldown-rs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI changed the title [WIP] Fix missing plugins export in package.json Fix: Export ./plugins in publishConfig for published packages Nov 10, 2025
Copilot AI requested a review from hyf0 November 10, 2025 20:27
@hyf0 hyf0 assigned shulaoda and unassigned hyf0 and Copilot Nov 10, 2025
@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 10, 2025

Open in StackBlitz

@rolldown/browser

npm i https://pkg.pr.new/@rolldown/browser@6926

@rolldown/debug

npm i https://pkg.pr.new/@rolldown/debug@6926

@rolldown/pluginutils

npm i https://pkg.pr.new/@rolldown/pluginutils@6926

rolldown

npm i https://pkg.pr.new/rolldown@6926

@rolldown/binding-android-arm64

npm i https://pkg.pr.new/@rolldown/binding-android-arm64@6926

@rolldown/binding-darwin-arm64

npm i https://pkg.pr.new/@rolldown/binding-darwin-arm64@6926

@rolldown/binding-darwin-x64

npm i https://pkg.pr.new/@rolldown/binding-darwin-x64@6926

@rolldown/binding-freebsd-x64

npm i https://pkg.pr.new/@rolldown/binding-freebsd-x64@6926

@rolldown/binding-linux-arm-gnueabihf

npm i https://pkg.pr.new/@rolldown/binding-linux-arm-gnueabihf@6926

@rolldown/binding-linux-arm64-gnu

npm i https://pkg.pr.new/@rolldown/binding-linux-arm64-gnu@6926

@rolldown/binding-linux-arm64-musl

npm i https://pkg.pr.new/@rolldown/binding-linux-arm64-musl@6926

@rolldown/binding-linux-x64-gnu

npm i https://pkg.pr.new/@rolldown/binding-linux-x64-gnu@6926

@rolldown/binding-linux-x64-musl

npm i https://pkg.pr.new/@rolldown/binding-linux-x64-musl@6926

@rolldown/binding-openharmony-arm64

npm i https://pkg.pr.new/@rolldown/binding-openharmony-arm64@6926

@rolldown/binding-wasm32-wasi

npm i https://pkg.pr.new/@rolldown/binding-wasm32-wasi@6926

@rolldown/binding-win32-arm64-msvc

npm i https://pkg.pr.new/@rolldown/binding-win32-arm64-msvc@6926

@rolldown/binding-win32-ia32-msvc

npm i https://pkg.pr.new/@rolldown/binding-win32-ia32-msvc@6926

@rolldown/binding-win32-x64-msvc

npm i https://pkg.pr.new/@rolldown/binding-win32-x64-msvc@6926

commit: 152538b

@hyf0 hyf0 changed the title Fix: Export ./plugins in publishConfig for published packages fix(node/exports): export ./plugins in publishConfig for rolldown Nov 10, 2025
@hyf0 hyf0 marked this pull request as ready for review November 10, 2025 21:02
@shulaoda shulaoda merged commit 9c2d706 into main Nov 10, 2025
56 of 67 checks passed
@shulaoda shulaoda deleted the copilot/fix-plugins-export-issue branch November 10, 2025 21:27
shulaoda added a commit that referenced this pull request Nov 10, 2025
## [1.0.0-beta.49] - 2025-11-10

### 🐛 Bug Fixes

- node/exports: export `./plugins` in `publishConfig` for `rolldown` (#6926) by @Copilot
- add type of `meta.ast`  for transform hook (#6919) by @IWANABETHATGUY

### ⚙️ Miscellaneous Tasks

- deps: update dependency rust to v1.91.1 (#6927) by @renovate[bot]
- deps: update dependency oxlint to v1.28.0 (#6924) by @renovate[bot]
- update example with `meta.ast` + `meta.nativeString` (#6922) by @IWANABETHATGUY

Co-authored-by: shulaoda <[email protected]>
@hyf0 hyf0 mentioned this pull request Nov 11, 2025
shulaoda added a commit that referenced this pull request Jan 21, 2026
Adds `publint` validation for all published npm packages to ensure
proper package.json exports and module configurations are maintained in
CI.

## Changes

- **Added publint dependency** (`publint@^0.3.16`) and `lint-publint`
script that validates all 4 published packages:
  - `packages/rolldown`
  - `packages/browser`
  - `packages/debug`
  - `packages/pluginutils`
- **Integrated into lint pipeline** via `justfile` `lint-node` target
- **CI validation** in `node-validation` job:
  - Adds WASI target for browser package build
  - Builds all published packages using just commands
  - Runs `pnpm lint-publint` to validate all packages after build

## Usage

```bash
pnpm lint-publint        # Check all published packages
just lint-node          # Full Node.js validation including publint
```

Publint validates:
- Export path correctness
- Module field configurations  
- Type definition alignment
- Package.json best practices

<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> 
> ----
> 
> *This section details on the original issue you should resolve*
> 
> <issue_title>Infra: setup `publint`</issue_title>
> <issue_description>Refs:
> 
> - https://publint.dev/docs/
> 
> Some thoughts:
> 
> - All js packages should be verified by `publint`
> - This process should part of `CI`
> - Not sure if `publint` could catch
#6926, but it's indeed a
motivator.
> </issue_description>
> 
> ## Comments on the Issue (you are @copilot in this section)
> 
> <comments>
> </comments>
> 


</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

- Fixes #6932

<!-- START COPILOT CODING AGENT TIPS -->
---

💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: shulaoda <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Plugins is not exported in beta.48

3 participants