web-infra-dev / web-infra-dev/rslib

[Feature]: Barrel files optimization in `bundle: false` mode

Open
#339 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

💡 feature
Dominant language
TypeScript
Stars
1k
Forks
67
Avg merge
6h 9m
Merged PRs (30d)
57

Description

What problem does this feature solve?

Barrel files is a development model commonly used in development.

Stop using Barrel files

how-we-optimized-package-imports-in-next-js

maybe we can automatically optimize this behavior in the output of lib

import { foo } from './index' -> import { foo } from './components/foo/index.mjs'

What does the proposed API look like?

1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or entry points. Start by tracing how bundle: false produces library output and review the linked barrel-file and Next.js optimization references. Done should be defined around whether imports such as ./index can be emitted as specific component paths without changing the requested API.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.