Skip to content

fix(accordion,grid): inherit the root tsup config so vanilla-extract runs#292

Closed
Yeom-JinHo wants to merge 1 commit into
devfrom
fix/accordion-grid-vanilla-extract-jinho
Closed

fix(accordion,grid): inherit the root tsup config so vanilla-extract runs#292
Yeom-JinHo wants to merge 1 commit into
devfrom
fix/accordion-grid-vanilla-extract-jinho

Conversation

@Yeom-JinHo

Copy link
Copy Markdown
Member

Changes

@sipe-team/accordion@sipe-team/grid.css.ts(vanilla-extract) 스타일을 쓰는 17개 패키지 중, tsup 설정이 루트 설정을 상속하지 않는 마지막 2개였습니다. 그 결과 vanilla-extract esbuild 플러그인이 이 둘에서만 실행되지 않았고, 다음 문제가 있었습니다:

  • Accordion.css.ts / Grid.css.ts가 일반 TypeScript로 번들되어, dist를 import하면 런타임에 예외가 발생합니다 (Styles were unable to be assigned to a file).
  • dist/index.css가 생성되지 않아, 두 패키지의 publishConfig가 이미 광고하고 있는 "./styles.css": "./dist/index.css" 진입점이 존재하지 않는 파일을 가리키고 있었습니다. 소비자의 import '@sipe-team/accordion/styles.css'ERR_MODULE_NOT_FOUND로 실패합니다.

이는 #291이 @sipe-team/tokens에서 고친 것과 동일한 결함의 잔여 케이스입니다. (#291의 changeset은 "tokens가 유일하게 루트 설정을 상속하지 않았다"고 기술했으나, 실제로는 accordion·grid가 같은 상태로 남아 있었습니다.)

변경 사항

  • packages/accordion/tsup.config.ts — 루트 설정 상속으로 교체 (다른 15개 패키지와 동일한 import defaultConfig from '../../tsup.config' 패턴)
  • packages/grid/tsup.config.ts — 동일
  • changeset 2개 추가 (accordion patch, grid patch — 패키지별 분리)

publishConfig.exportssideEffects: ["**/*.css"]는 이미 올바르게 선언돼 있어 건드리지 않았습니다 — 이제서야 그 선언이 지켜집니다.

Visuals

없음 (빌드 설정 변경).

빌드 산출물 before/after:

dist/index.css dist/index.js의 VE 런타임 import
수정 전 (dev) ❌ 생성 안 됨 @vanilla-extract/css 잔존 (런타임 throw)
수정 후 ✅ accordion 1,882B / grid 1,830B 0건 (빌드타임 컴파일)

Checklist

  • Have you written the functional specifications? — 배포 버그 수정. changeset 2개에 상세 기술

…runs

accordion and grid were the last two styled packages whose tsup.config.ts
did not inherit the root config, so the vanilla-extract esbuild plugin never
ran for them. Their .css.ts bundled as ordinary TypeScript: importing dist
threw at runtime, and dist/index.css was never emitted — even though both
publishConfig blocks already advertise "./styles.css": "./dist/index.css".
Consumers importing that subpath got ERR_MODULE_NOT_FOUND.

Same defect #291 fixed for @sipe-team/tokens; these are the residual cases.

publishConfig.exports and sideEffects were already declared correctly and are
left untouched — they simply start being honoured.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (2)
  • main
  • release/v1

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 17c6149c-20cd-41cf-bce1-43ad0a3458c0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/accordion-grid-vanilla-extract-jinho

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@changeset-bot

changeset-bot Bot commented Jul 15, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 8aa8cc7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@sipe-team/accordion Patch
@sipe-team/grid Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codecov

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@osohyun0224 osohyun0224 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

고생많으셨습니다 bb

@G-hoon

G-hoon commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator

진호님 이 PR은 머지할 필요가 없는 PR인 것 같습니다.

이미 #289 에서

  • packages/accordion/tsup.config.ts
  • packages/grid/tsup.config.ts

를 동일하게 수정했고, .changeset/accordion-grid-compile-styles.md로 changeset도 이미 반영해두셨더라고요.

그래서 이 PR의 .changeset/fix-accordion-vanilla-extract.md, fix-grid-vanilla-extract.md도 같은 내용이라 머지되면 중복될 것 같습니다.

(이 PR이 갈라진 뒤에 #289가 머지돼서 diff에 남아있는 것 같아요~! dev 기준으로는 두 파일 다 동일한 것으로 보입니다)

@Yeom-JinHo Yeom-JinHo closed this Jul 18, 2026
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.

3 participants