Skip to content

export * from external module will introduce unnecessary import statement. #429

@fi3ework

Description

@fi3ework

Adding this to package.json

  "pnpm": {
    "overrides": {
      "@rspack/core": "1.1.0"
    }
  }

will fix the bug. Export star from external files fixing PR are landed in 1.1.0. So an override is required (I don't know much about Bun, I tested it using pnpm :P )

The barrel file would be like:

import "./foo.js";
export * from "./foo.js";
 // CONCATENATED MODULE: ./src/barrel.js

The first line should be striped as a known issue, still under working.

But this reproduction recalls me that: Rslib relies on a minimal version of @rspack/core among ^1.0.0, but it's prone to not be fresh enough. We might need to check @rspack/core version inside Rslib preflight, and throw some warning/error to user.

Originally posted by @fi3ework in #384

Metadata

Metadata

Assignees

Labels

RspackRspack related issue

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions